summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/mirror.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py
index 97aeef5434..aef5e2e8ee 100644
--- a/lib/spack/spack/mirror.py
+++ b/lib/spack/spack/mirror.py
@@ -104,6 +104,9 @@ def get_matching_versions(specs, **kwargs):
s = Spec(pkg.name)
s.versions = VersionList([v])
s.variants = spec.variants.copy()
+ # This is needed to avoid hanging references during the
+ # concretization phase
+ s.variants.spec = s
matching_spec.append(s)
if not matching_spec: