Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-05-07 15:02:42 +0000
committerPascal Rapicault2010-05-07 15:02:42 +0000
commit48dac619754c1b269d36d57546c0ca0e93084674 (patch)
treef8cdcb30fbc8aec70d78eb215def92356e5da51c /bundles
parentfa3ed9bd275245bd01c7c3a7fc9a797f22fe6ff5 (diff)
downloadrt.equinox.p2-48dac619754c1b269d36d57546c0ca0e93084674.tar.gz
rt.equinox.p2-48dac619754c1b269d36d57546c0ca0e93084674.tar.xz
rt.equinox.p2-48dac619754c1b269d36d57546c0ca0e93084674.zip
Bug 311330 - [planner] Strict negation not taken into account when the IU is patched
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java1
2 files changed, 6 insertions, 1 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 e04c66a5f..dec329860 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
@@ -295,7 +295,7 @@ public class Projector {
maxWeight = weight;
}
- // no need to add one here, since maxWeight is strickly greater than the
+ // no need to add one here, since maxWeight is strictly greater than the
// maximal weight used so far.
maxWeight = maxWeight.multiply(POWER);
@@ -564,6 +564,10 @@ public class Projector {
for (int i = 0; i < reqs.length; i++) {
//The requirement is unchanged
if (reqs[i][0] == reqs[i][1]) {
+ if (reqs[i][0].getMax() == 0) {
+ expandNegatedRequirement(reqs[i][0], iu, optionalAbstractRequirements, isRootIu);
+ return;
+ }
if (!isApplicable(reqs[i][0]))
continue;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
index e6c6fa829..1cddc2f42 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
@@ -55,6 +55,7 @@ public class AllTests extends TestCase {
// suite.addTestSuite(Bug306279b.class);
suite.addTestSuite(Bug306279c.class);
suite.addTestSuite(Bug306279d.class);
+ suite.addTestSuite(Bug311330.class);
suite.addTestSuite(DependencyOnSelf.class);
suite.addTestSuite(DisabledExplanation.class);
suite.addTestSuite(DropinsScenario.class);

Back to the top