Fix #238: Database specs need to be concrete when read in as well.
This commit is contained in:
parent
dc3b54a681
commit
2f9ee88408
@ -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 New Issue
Block a user