Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-04-12 20:57:19 +0000
committerDJ Houghton2010-04-12 20:57:19 +0000
commitde86929d011128377a34f297b3a30c0de18a7bbf (patch)
tree2eebc86108d6b0706aad9fa7d5500ce71db86e79 /bundles/org.eclipse.equinox.p2.reconciler.dropins
parent2e911067afdde1a3153dc49680efb48fd05422ce (diff)
downloadrt.equinox.p2-de86929d011128377a34f297b3a30c0de18a7bbf.tar.gz
rt.equinox.p2-de86929d011128377a34f297b3a30c0de18a7bbf.tar.xz
rt.equinox.p2-de86929d011128377a34f297b3a30c0de18a7bbf.zip
Bug 306424 - [reconciler] Optionally installed IU not removed when dependent IU is removed
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.reconciler.dropins')
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index 2a2dcc161..45eaec847 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -25,7 +25,7 @@ import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
import org.eclipse.equinox.p2.query.*;
@@ -424,6 +424,15 @@ public class ProfileSynchronizer {
if (!toMove.isEmpty()) {
ReconcilerProfileChangeRequest moveRequest = new ReconcilerProfileChangeRequest(profile, true);
moveRequest.removeAll(toMove);
+ // force removal of all moved IUs, which will also remove anything which depends on them
+ // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306424#c6
+ Collection<IRequirement> extraReqs = new ArrayList<IRequirement>();
+ for (IInstallableUnit unit : toMove) {
+ IRequirement negation = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), //
+ new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false);
+ extraReqs.add(negation);
+ }
+ moveRequest.addExtraRequirements(extraReqs);
debug(request);
return moveRequest;
}

Back to the top