Merge pull request #963 from eschnett/eschnett/duplicate-providers
Remove duplicate providers that can concretize to the same result
This commit is contained in:
commit
6384264aa7
1 changed files with 5 additions and 0 deletions
|
@ -1071,6 +1071,11 @@ def _find_provider(self, vdep, provider_index):
|
|||
# If there is a provider for the vpkg, then use that instead of
|
||||
# the virtual package.
|
||||
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.
|
||||
if len(providers) > 1:
|
||||
raise MultipleProviderError(vdep, providers)
|
||||
|
|
Loading…
Reference in a new issue