Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2008-02-01 13:46:13 -0500
committerThomas Watson2008-02-01 13:46:13 -0500
commit9bd1f4db38340d418cee5fb842b27e4c2a1bf34c (patch)
tree38c3cc2d0eb1b0e046cfd9684873da55b9be7b33 /bundles/org.eclipse.osgi/resolver
parente1d17b1b2da8dbab395559f5487cc713acfa3d0b (diff)
downloadrt.equinox.framework-9bd1f4db38340d418cee5fb842b27e4c2a1bf34c.tar.gz
rt.equinox.framework-9bd1f4db38340d418cee5fb842b27e4c2a1bf34c.tar.xz
rt.equinox.framework-9bd1f4db38340d418cee5fb842b27e4c2a1bf34c.zip
Bug 217317 Need an option to bypass "uses" constraint checksv20080201
Diffstat (limited to 'bundles/org.eclipse.osgi/resolver')
-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