Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-09-05 16:40:43 -0400
committerPascal Rapicault2011-09-05 16:42:07 -0400
commit37df25467c3b5a333c6c7993836723da05d9e8e1 (patch)
tree28cf00fb5b7ca7102e7653f7e3cd66bca27f5502 /bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2
parentdf0e3ecefa5df573f6b51a49155442d83fdb2a5f (diff)
downloadrt.equinox.p2-37df25467c3b5a333c6c7993836723da05d9e8e1.tar.gz
rt.equinox.p2-37df25467c3b5a333c6c7993836723da05d9e8e1.tar.xz
rt.equinox.p2-37df25467c3b5a333c6c7993836723da05d9e8e1.zip
Actual RequestStatus incorrectly set when adding and removing the same
IU
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/SimplePlanner.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index e8d6be1e7..63447fd65 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -21,7 +21,8 @@ import org.eclipse.equinox.internal.p2.director.Explanation.MissingIU;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
import org.eclipse.equinox.internal.p2.rollback.FormerState;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
+import org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus;
+import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.engine.*;
@@ -93,7 +94,9 @@ public class SimplePlanner implements IPlanner {
private Map<IInstallableUnit, RequestStatus>[] computeActualChangeRequest(Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest) {
Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
- Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+ Collection<IInstallableUnit> requestedRemovals = new ArrayList<IInstallableUnit>(changeRequest.getRemovals());
+ requestedRemovals.removeAll(requestedAdditions);
+
Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedRemovals.size());
for (IInstallableUnit added : requestedAdditions) {
if (toState.contains(added))

Back to the top