Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-05-20 20:35:41 +0000
committerPascal Rapicault2010-05-20 20:35:41 +0000
commita583cec4c485c13310530063015de8e54a77937e (patch)
tree0d8e8082ee4e38a4b189ee8042aaa6ce8a19281e /bundles/org.eclipse.equinox.p2.director
parent0d5faf566f30537925f0577eda26be19e5b05ca6 (diff)
downloadrt.equinox.p2-a583cec4c485c13310530063015de8e54a77937e.tar.gz
rt.equinox.p2-a583cec4c485c13310530063015de8e54a77937e.tar.xz
rt.equinox.p2-a583cec4c485c13310530063015de8e54a77937e.zip
Bug 300572 - [planner] no solution when second feature patch installed by drop-in
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java27
1 files changed, 16 insertions, 11 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 12c100dab..65be6f2a2 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
@@ -553,7 +553,7 @@ public class Projector {
}
static final class Pending {
- List<IInstallableUnit> matches;
+ List<? super IInstallableUnitPatch> matches;
Explanation explanation;
Object left;
}
@@ -671,12 +671,15 @@ public class Projector {
pending.matches.add(patch);
continue;
}
-
+ pending = new Pending();
+ pending.left = iu;
List<IInstallableUnit> matches = getApplicableMatches(req);
determinePotentialHostsForFragment(iu);
if (req.getMin() > 0) {
if (matches.isEmpty()) {
- dependencyHelper.implication(new Object[] {iu}).implies(patch).named(new Explanation.HardRequirement(iu, null));
+ matches.add(patch);
+ pending.explanation = new Explanation.HardRequirement(iu, req);
+ pending.matches = matches;
} else {
// manage non greedy IUs
IInstallableUnit current;
@@ -702,11 +705,8 @@ public class Projector {
}
// Fix: make sure we collect all patches that will impact this IU-req, not just one
- pending = new Pending();
- pending.left = iu;
pending.explanation = explanation;
pending.matches = matches;
- nonPatchedRequirements.put(req, pending);
for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
current = it.next();
if (nonGreedyIUs.contains(current)) {
@@ -719,22 +719,25 @@ public class Projector {
current = it.next();
newConstraint.add(getNonGreedyVariable(current));
}
- createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
+ pending.explanation = new Explanation.HardRequirement(iu, req);
+ pending.matches = newConstraint;
}
+ nonPatchedRequirements.put(req, pending);
+
}
} else {
if (!matches.isEmpty()) {
IInstallableUnit current;
AbstractVariable abs;
matches.add(patch);
+ pending = new Pending();
+ pending.explanation = Explanation.OPTIONAL_REQUIREMENT;
+
if (req.isGreedy()) {
abs = getAbstractVariable(req);
// Fix: make sure we collect all patches that will impact this IU-req, not just one
- pending = new Pending();
pending.left = new Object[] {abs, iu};
- pending.explanation = Explanation.OPTIONAL_REQUIREMENT;
pending.matches = matches;
- nonPatchedRequirements.put(req, pending);
for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
current = it.next();
if (nonGreedyIUs.contains(current)) {
@@ -749,8 +752,10 @@ public class Projector {
newConstraint.add(getNonGreedyVariable(current));
}
newConstraint.add(patch);
- createImplication(new Object[] {abs, iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
+ pending.left = new Object[] {abs, iu};
+ pending.matches = newConstraint;
}
+ nonPatchedRequirements.put(req, pending);
optionalAbstractRequirements.add(abs);
}
}

Back to the top