Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-12-13 15:46:58 +0000
committerDJ Houghton2011-12-13 15:46:58 +0000
commitacf42bc70425df51c80f46fbb5d2a0b83d37dd72 (patch)
tree97d68bbcf5e392cdbbf41d510db3e6e1e75c1bc3
parent545f03adb3664cea2207501550b0219bab10a478 (diff)
downloadrt.equinox.p2-acf42bc70425df51c80f46fbb5d2a0b83d37dd72.tar.gz
rt.equinox.p2-acf42bc70425df51c80f46fbb5d2a0b83d37dd72.tar.xz
rt.equinox.p2-acf42bc70425df51c80f46fbb5d2a0b83d37dd72.zip
Bug 362692 - Reconciler inconsistent with small sampling
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java14
1 files changed, 5 insertions, 9 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 3c426108d..57b60f4b3 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
@@ -539,7 +539,6 @@ public class ProfileSynchronizer {
if (resolve)
request.removeProfileProperty("org.eclipse.equinox.p2.resolve"); //$NON-NLS-1$
- List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
List<IInstallableUnit> toMove = new ArrayList<IInstallableUnit>();
@@ -549,12 +548,12 @@ public class ProfileSynchronizer {
// we use IProfile.available(...) here so that we also gather any shared IUs
Map<IInstallableUnit, IInstallableUnit> availableProfileIUs = getAvailableProfileIUs();
- // get all IUs from all our repos (toAdd)
+ // get all IUs from all our repos
IQueryResult<IInstallableUnit> allIUs = getAllIUsFromRepos();
for (Iterator<IInstallableUnit> iter = allIUs.iterator(); iter.hasNext();) {
final IInstallableUnit iu = iter.next();
IInstallableUnit existing = profileIUs.get(iu);
- // check to see if it is really the same 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());
@@ -562,7 +561,6 @@ public class ProfileSynchronizer {
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));
- toAdd.add(iu);
// 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.
@@ -600,9 +598,7 @@ public class ProfileSynchronizer {
}
// if the IU from the profile is in the "all available" list, then it is already added
// otherwise if it isn't in the repo then we have to remove it from the profile.
- if (all.contains(iu))
- toAdd.remove(iu);
- else
+ if (!all.contains(iu))
toRemove.add(iu);
}
@@ -612,8 +608,8 @@ public class ProfileSynchronizer {
return null;
}
- context.setExtraInstallableUnits(toAdd);
- request.addAll(toAdd);
+ // everything from the drop-ins must be considered for addition/removal everytime so add all here
+ request.addAll(all);
request.removeAll(toRemove);
request.moveAll(toMove);

Back to the top