summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthew LeGendre <legendre1@llnl.gov>2016-10-21 13:47:25 -0700
committerGitHub <noreply@github.com>2016-10-21 13:47:25 -0700
commit79c20a7edd3d00970a5bf023376ad7a290a2c42b (patch)
treede090d2af4c1d725288c469653f14dd0ff152a66 /lib
parent52158d9316aabd9c02a719825928607cb5204377 (diff)
parent5ff08386af70818e48d81c1d49c0c6e373763c16 (diff)
downloadspack-79c20a7edd3d00970a5bf023376ad7a290a2c42b.tar.gz
spack-79c20a7edd3d00970a5bf023376ad7a290a2c42b.tar.bz2
spack-79c20a7edd3d00970a5bf023376ad7a290a2c42b.tar.xz
spack-79c20a7edd3d00970a5bf023376ad7a290a2c42b.zip
Merge pull request #2071 from mplegendre/bug_concretize_external_virtuals
Bug concretize external virtuals
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/concretize.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 9c9e9e10ff..2351e2bfc9 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -95,7 +95,11 @@ class DefaultConcretizer(object):
not b.external and b.external_module):
# We're choosing between different providers, so
# maintain order from provider sort
- return candidates.index(a) - candidates.index(b)
+ index_of_a = next(i for i in range(0, len(candidates))
+ if a.satisfies(candidates[i]))
+ index_of_b = next(i for i in range(0, len(candidates))
+ if b.satisfies(candidates[i]))
+ return index_of_a - index_of_b
result = cmp_specs(a, b)
if result != 0: