summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 47331a3629..a4e55715ed 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1602,7 +1602,12 @@ class SpecBuilder(object):
# fix flags after all specs are constructed
self.reorder_flags()
- for root in set([spec.root for spec in self._specs.values()]):
+ # inject patches -- note that we' can't use set() to unique the
+ # roots here, because the specs aren't complete, and the hash
+ # function will loop forever.
+ roots = [spec.root for spec in self._specs.values()]
+ roots = dict((id(r), r) for r in roots)
+ for root in roots.values():
spack.spec.Spec.inject_patches_variant(root)
# Add external paths to specs with just external modules