Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 323340
Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/director/Projector.java (-8 / +4 lines)
Lines 284-306 Link Here
284
284
285
		BigInteger maxWeight = POWER;
285
		BigInteger maxWeight = POWER;
286
		for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
286
		for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
287
			Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
287
			List<IInstallableUnit> conflictingEntries = new ArrayList<IInstallableUnit>(entry.getValue().values());
288
289
			List<IInstallableUnit> toSort = new ArrayList<IInstallableUnit>(conflictingEntries.values());
290
			if (conflictingEntries.size() == 1) {
288
			if (conflictingEntries.size() == 1) {
291
				IInstallableUnit iu = toSort.get(0);
289
				IInstallableUnit iu = conflictingEntries.get(0);
292
				if (iu != metaIu) {
290
				if (iu != metaIu) {
293
					weightedObjects.add(WeightedObject.newWO(iu, POWER));
291
					weightedObjects.add(WeightedObject.newWO(iu, POWER));
294
				}
292
				}
295
				continue;
293
				continue;
296
			}
294
			}
297
			Collections.sort(toSort, Collections.reverseOrder());
295
			Collections.sort(conflictingEntries, Collections.reverseOrder());
298
			BigInteger weight = POWER;
296
			BigInteger weight = POWER;
299
			int count = toSort.size();
300
			boolean installedIuMet = false;
297
			boolean installedIuMet = false;
301
			boolean rootedMet = false;
298
			boolean rootedMet = false;
302
			for (int i = 0; i < count; i++) {
299
			for (IInstallableUnit iu : conflictingEntries) {
303
				IInstallableUnit iu = toSort.get(i);
304
				if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
300
				if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
305
					installedIuMet = true;
301
					installedIuMet = true;
306
					weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
302
					weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));

Return to bug 323340