Merge pull request #239 from LLNL/bugfix/238-db-specs-not-concrete
Fix #238: Database specs need to be concrete when read in as well.
This commit is contained in:
commit
9cab88071b
3 changed files with 17 additions and 4 deletions
|
@ -211,6 +211,10 @@ def _read_spec_from_yaml(self, hash_key, installs, parent_key=None):
|
|||
child = self._read_spec_from_yaml(dep_hash, installs, hash_key)
|
||||
spec._add_dependency(child)
|
||||
|
||||
# Specs from the database need to be marked concrete because
|
||||
# they represent actual installations.
|
||||
spec._mark_concrete()
|
||||
|
||||
return spec
|
||||
|
||||
|
||||
|
|
|
@ -212,9 +212,7 @@ def read_spec(self, path):
|
|||
spec = Spec.from_yaml(f)
|
||||
|
||||
# Specs read from actual installations are always concrete
|
||||
for s in spec.traverse():
|
||||
s._normal = True
|
||||
s._concrete = True
|
||||
spec._mark_concrete()
|
||||
|
||||
return spec
|
||||
|
||||
|
|
|
@ -833,7 +833,18 @@ def concretize(self):
|
|||
changed = any(changes)
|
||||
force=True
|
||||
|
||||
self._concrete = True
|
||||
self._mark_concrete()
|
||||
|
||||
|
||||
def _mark_concrete(self):
|
||||
"""Mark this spec and its dependencies as concrete.
|
||||
|
||||
Only for internal use -- client code should use "concretize"
|
||||
unless there is a need to force a spec to be concrete.
|
||||
"""
|
||||
for s in self.traverse():
|
||||
s._normal = True
|
||||
s._concrete = True
|
||||
|
||||
|
||||
def concretized(self):
|
||||
|
|
Loading…
Reference in a new issue