Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj2011-11-07 16:42:59 -0500
committerdj2011-11-07 16:42:59 -0500
commit4a859168334c2d481bb37932b113135831e73a72 (patch)
tree06aab3e88927528139cbd1a038abd33d9857e3a7 /bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2
parent660583f738fb90827ef1488e80f07f1faf102d66 (diff)
downloadrt.equinox.p2-4a859168334c2d481bb37932b113135831e73a72.tar.gz
rt.equinox.p2-4a859168334c2d481bb37932b113135831e73a72.tar.xz
rt.equinox.p2-4a859168334c2d481bb37932b113135831e73a72.zip
Added comments and debugging.v20111107-2142
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
index db4520848..64623eb24 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
@@ -294,14 +294,16 @@ public class Projector {
}
Collections.sort(conflictingEntries, Collections.reverseOrder());
BigInteger weight = POWER;
- boolean installedIuMet = false;
- boolean rootedMet = false;
+ // have we already found a version that is already installed?
+ boolean foundInstalled = false;
+ // have we already found a version that is in the new roots?
+ boolean foundRoot = false;
for (IInstallableUnit iu : conflictingEntries) {
- if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
- installedIuMet = true;
+ if (!foundRoot && isInstalled(iu) && !transitiveClosure.contains(iu)) {
+ foundInstalled = true;
weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
- } else if (!installedIuMet && !rootedMet && isRoot(iu, newRoots)) {
- rootedMet = true;
+ } else if (!foundInstalled && !foundRoot && isRoot(iu, newRoots)) {
+ foundRoot = true;
weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
} else {
weightedObjects.add(WeightedObject.newWO(iu, weight));

Back to the top