Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java')
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 17808b351..d4f59b538 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -12,6 +12,7 @@ import java.util.*;
import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor;
import org.eclipse.osgi.framework.debug.Debug;
import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
+import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
import org.eclipse.osgi.internal.module.GroupingChecker.PackageRoots;
import org.eclipse.osgi.internal.resolver.BundleDescriptionImpl;
import org.eclipse.osgi.internal.resolver.ExportPackageDescriptionImpl;
@@ -578,13 +579,17 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
}
private ArrayList findBestCombination(ResolverBundle[] bundles) {
+ String usesMode = FrameworkProperties.getProperty("osgi.resolver.usesMode"); //$NON-NLS-1$
+ if ("ignore".equals(usesMode)) //$NON-NLS-1$
+ return null;
HashSet bundleConstraints = new HashSet();
HashSet packageConstraints = new HashSet();
- // first tryout the initial selections
+ // first try out the initial selections
ArrayList initialConflicts = getConflicts(bundles, packageConstraints, bundleConstraints);
- if (initialConflicts == null) {
+ if (initialConflicts == null || "tryFirst".equals(usesMode)) { //$NON-NLS-1$
groupingChecker.clear();
- return null; // the first selected have no conflicts; return without iterating over all combinations
+ // the first combination have no conflicts or we only are trying the first combination; return without iterating over all combinations
+ return initialConflicts;
}
ResolverConstraint[][] multipleSuppliers = getMultipleSuppliers(bundles, packageConstraints, bundleConstraints);
ArrayList conflicts = null;

Back to the top