Skip to content

Commit

Permalink
Consider a requirement's filter and max when computing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
merks authored and laeubi committed Dec 10, 2023
1 parent 2f81c3b commit 579e03b
Show file tree
Hide file tree
Showing 15 changed files with 1,891 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ public IQueryResult<IInstallableUnit> computeDirectDependencies(Collection<IInst
}).toList();
for (IInstallableUnit iu : avaiableIUs.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet()) {
for (IRequirement requirement : collect) {
if (iu.satisfies(requirement)) {
// Negative requirements should not create a dependency.
// If there is a filter, we need more context, e.g, see
// org.eclipse.equinox.internal.p2.director.Slicer.isApplicable(IRequirement)
// Failing that, we need to assume the filter isn't applicable.
if (requirement.getMax() != 0 && requirement.getFilter() == null && iu.satisfies(requirement)) {
result.add(iu);
// TODO remove the requirement from the set so we only collect exactly one
// provider for a requirement?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.justj.openjdk.hotspot.jre.base.stripped;singleton:=true
Bundle-Version: 17.0.9.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Automatic-Module-Name: org.eclipse.justj.openjdk.hotspot.jre.base.stripped
Loading

0 comments on commit 579e03b

Please sign in to comment.