Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2014-02-24 14:04:17 -0500
committerPascal Rapicault2014-02-24 14:21:36 -0500
commit088d18233f6713231418f244337fb56f7f19a57d (patch)
tree7bda5f07b0ec19104b144f5324c60fdd7ab1968e /bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2
parent64975349785ed9cb5983e35a1b290bf69f09a6cb (diff)
downloadrt.equinox.p2-088d18233f6713231418f244337fb56f7f19a57d.tar.gz
rt.equinox.p2-088d18233f6713231418f244337fb56f7f19a57d.tar.xz
rt.equinox.p2-088d18233f6713231418f244337fb56f7f19a57d.zip
Bug 428684 - [remediation] Plug-ins directly installed can break resulting installI20140225-0800
Change-Id: Ibb4a918d708c1d7044a970dedf58ff9b75bb7f6c Signed-off-by: Pascal Rapicault <pascal@rapicorp.com>
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/ProfileChangeRequest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
index e20b755d8..00410f50f 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
@@ -80,7 +80,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
public void add(IInstallableUnit toInstall) {
if (iusToAdd == null)
iusToAdd = new ArrayList<IInstallableUnit>();
- iusToAdd.add(toInstall);
+ iusToAdd.add(toInstall.unresolved());
}
/* (non-Javadoc)
@@ -102,7 +102,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
public void remove(IInstallableUnit toUninstall) {
if (iusToRemove == null)
iusToRemove = new ArrayList<IInstallableUnit>();
- iusToRemove.add(toUninstall);
+ iusToRemove.add(toUninstall.unresolved());
}
public void removeInstallableUnits(IInstallableUnit[] toUninstall) {
@@ -142,6 +142,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
public void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value) {
if (iuPropertiesToAdd == null)
iuPropertiesToAdd = new HashMap<IInstallableUnit, Map<String, String>>();
+ iu = iu.unresolved();
Map<String, String> properties = iuPropertiesToAdd.get(iu);
if (properties == null) {
properties = new HashMap<String, String>();
@@ -156,6 +157,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
public void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key) {
if (iuPropertiesToRemove == null)
iuPropertiesToRemove = new HashMap<IInstallableUnit, List<String>>();
+ iu = iu.unresolved();
List<String> keys = iuPropertiesToRemove.get(iu);
if (keys == null) {
keys = new ArrayList<String>();
@@ -213,14 +215,14 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
* @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String)
*/
public void setInstallableUnitInclusionRules(IInstallableUnit iu, String value) {
- setInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES, value);
+ setInstallableUnitProfileProperty(iu.unresolved(), SimplePlanner.INCLUSION_RULES, value);
}
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit)
*/
public void removeInstallableUnitInclusionRules(IInstallableUnit iu) {
- removeInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES);
+ removeInstallableUnitProfileProperty(iu.unresolved(), SimplePlanner.INCLUSION_RULES);
}
@SuppressWarnings("unchecked")

Back to the top