summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/database.py2
-rw-r--r--lib/spack/spack/spec.py12
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index 0183df167b..0efaab9eb0 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -795,7 +795,7 @@ class Database(object):
# do it *while* we're constructing specs,it causes hashes to be
# cached prematurely.
for hash_key, rec in data.items():
- rec.spec._mark_concrete()
+ rec.spec._mark_root_concrete()
self._data = data
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 985236bf6d..5986cf8e18 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2538,6 +2538,13 @@ class Spec(object):
else:
self._old_concretize(tests)
+ def _mark_root_concrete(self, value=True):
+ """Mark just this spec (not dependencies) concrete."""
+ if (not value) and self.concrete and self.package.installed:
+ return
+ self._normal = value
+ self._concrete = value
+
def _mark_concrete(self, value=True):
"""Mark this spec and its dependencies as concrete.
@@ -2545,10 +2552,7 @@ class Spec(object):
unless there is a need to force a spec to be concrete.
"""
for s in self.traverse():
- if (not value) and s.concrete and s.package.installed:
- continue
- s._normal = value
- s._concrete = value
+ s._mark_root_concrete(value)
def concretized(self, tests=False):
"""This is a non-destructive version of concretize().