More flexible reading of specs from DB, formatting.
This commit is contained in:
parent
f3f0122f11
commit
24ee32d7b0
@ -214,9 +214,10 @@ def _read_spec_from_yaml(self, hash_key, installs, parent_key=None):
|
|||||||
|
|
||||||
# Add dependencies from other records in the install DB to
|
# Add dependencies from other records in the install DB to
|
||||||
# form a full spec.
|
# form a full spec.
|
||||||
for dep_hash in spec_dict[spec.name]['dependencies'].values():
|
if 'dependencies' in spec_dict[spec.name]:
|
||||||
child = self._read_spec_from_yaml(dep_hash, installs, hash_key)
|
for dep_hash in spec_dict[spec.name]['dependencies'].values():
|
||||||
spec._add_dependency(child)
|
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
|
# Specs from the database need to be marked concrete because
|
||||||
# they represent actual installations.
|
# they represent actual installations.
|
||||||
@ -289,7 +290,8 @@ def check(cond, msg):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
tty.warn("Invalid database reecord:",
|
tty.warn("Invalid database reecord:",
|
||||||
"file: %s" % self._index_path,
|
"file: %s" % self._index_path,
|
||||||
"hash: %s" % hash_key, "cause: %s" % str(e))
|
"hash: %s" % hash_key,
|
||||||
|
"cause: %s: %s" % (type(e).__name__, str(e)))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
self._data = data
|
self._data = data
|
||||||
|
Loading…
Reference in New Issue
Block a user