summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-05-17 12:50:18 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-05-17 12:50:18 -0700
commit6384264aa72161f644b57a9d3d3d4f40c8e7f945 (patch)
tree4d41308f952f27824e5c7014a669bb24f20c7db2 /lib
parent3d9c8f4fd4091b40d5d282559b498d3d505ff649 (diff)
parentfcc4c1b2f20fd1e19f7443923f779ef4e5b9c5d0 (diff)
downloadspack-6384264aa72161f644b57a9d3d3d4f40c8e7f945.tar.gz
spack-6384264aa72161f644b57a9d3d3d4f40c8e7f945.tar.bz2
spack-6384264aa72161f644b57a9d3d3d4f40c8e7f945.tar.xz
spack-6384264aa72161f644b57a9d3d3d4f40c8e7f945.zip
Merge pull request #963 from eschnett/eschnett/duplicate-providers
Remove duplicate providers that can concretize to the same result
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 89a023a750..470353c4f6 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1071,6 +1071,11 @@ class Spec(object):
# 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)