Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java35
1 files changed, 19 insertions, 16 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 57b60f4b3..cb539219b 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
@@ -553,21 +553,8 @@ public class ProfileSynchronizer {
for (Iterator<IInstallableUnit> iter = allIUs.iterator(); iter.hasNext();) {
final IInstallableUnit iu = iter.next();
IInstallableUnit existing = profileIUs.get(iu);
- // the IU doesn't exist in the profile so we are adding it and need to set properties
- if (existing == null) {
- if (QueryUtil.isGroup(iu))
- request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- // mark all IUs with special property
- request.setInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS, Boolean.TRUE.toString());
- request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
- request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.toString(IProfile.LOCK_UNINSTALL));
-
- // as soon as we find something locally that needs to be installed, then
- // everything from the parent's dropins must be installed locally as well.
- if (!foundIUsToAdd && availableProfileIUs.get(iu) == null) {
- foundIUsToAdd = true;
- }
- } else {
+ // check to see if this IU has moved locations
+ if (existing != null) {
// if the IU is already installed in the profile then check to see if it was moved.
String one = iu.getProperty(RepositoryListener.FILE_NAME);
String two = existing.getProperty(RepositoryListener.FILE_NAME);
@@ -576,8 +563,24 @@ public class ProfileSynchronizer {
// cheat here... since we always set the filename property for bundles in the dropins,
// if the existing IU's filename is null then it isn't from the dropins. a better
// (and more expensive) way to find this out is to do an IU profile property query.
- if (one != null && two != null && !one.equals(two))
+ if (one != null && two != null && !one.equals(two)) {
toMove.add(iu);
+ break;
+ }
+ }
+ // even though we are adding all IUs below, we need to explicitly set the properties for
+ // them as well. Do that here.
+ if (QueryUtil.isGroup(iu))
+ request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+ // mark all IUs with special property
+ request.setInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS, Boolean.TRUE.toString());
+ request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
+ request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.toString(IProfile.LOCK_UNINSTALL));
+
+ // as soon as we find something locally that needs to be installed, then
+ // everything from the parent's dropins must be installed locally as well.
+ if (!foundIUsToAdd && availableProfileIUs.get(iu) == null) {
+ foundIUsToAdd = true;
}
}

Back to the top