Skip to content
Snippets Groups Projects
Commit fcc4c1b2 authored by Erik Schnetter's avatar Erik Schnetter
Browse files

Remove duplicate providers that can concretize to the same result

Patch generously provided by @becker33.

Closes #928.
parent 1774c7a7
Branches
Tags
No related merge requests found
...@@ -1071,6 +1071,11 @@ def _find_provider(self, vdep, provider_index): ...@@ -1071,6 +1071,11 @@ def _find_provider(self, vdep, provider_index):
# If there is a provider for the vpkg, then use that instead of # If there is a provider for the vpkg, then use that instead of
# the virtual package. # the virtual package.
if providers: if providers:
# Remove duplicate providers that can concretize to the same result.
for provider in providers:
for spec in providers:
if spec is not provider and provider.satisfies(spec):
providers.remove(spec)
# Can't have multiple providers for the same thing in one spec. # Can't have multiple providers for the same thing in one spec.
if len(providers) > 1: if len(providers) > 1:
raise MultipleProviderError(vdep, providers) raise MultipleProviderError(vdep, providers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment