summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-10 15:00:19 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-10 15:00:19 +0100
commit233360b49690e777006255b8b0373bf723c3827f (patch)
tree1e3da775db71ff7b8fe3e2834f483251b0d7a5c3
parent319a84042cbe9b393b80aa7b660639b76bad1b8a (diff)
parentada45fec664a120bb313d929bedc1645d3feff58 (diff)
downloadmorph-233360b49690e777006255b8b0373bf723c3827f.tar.gz
Merge branch 'sam/fix-list-artifacts'
Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk> Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
-rw-r--r--morphlib/plugins/list_artifacts_plugin.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/morphlib/plugins/list_artifacts_plugin.py b/morphlib/plugins/list_artifacts_plugin.py
index 61c8d160..0f14a579 100644
--- a/morphlib/plugins/list_artifacts_plugin.py
+++ b/morphlib/plugins/list_artifacts_plugin.py
@@ -89,7 +89,7 @@ class ListArtifactsPlugin(cliapp.Plugin):
self.app.status(
msg='Resolving artifacts for %s' % system_filename, chatty=True)
- artifacts = self.resolver.resolve_artifacts(source_pool)
+ root_artifacts = self.resolver.resolve_root_artifacts(source_pool)
def find_artifact_by_name(artifacts_list, filename):
for a in artifacts_list:
@@ -97,7 +97,8 @@ class ListArtifactsPlugin(cliapp.Plugin):
return a
raise ValueError
- system_artifact = find_artifact_by_name(artifacts, system_filename)
+ system_artifact = find_artifact_by_name(root_artifacts,
+ system_filename)
self.app.status(
msg='Computing cache keys for %s' % system_filename, chatty=True)
@@ -106,8 +107,8 @@ class ListArtifactsPlugin(cliapp.Plugin):
ckc = morphlib.cachekeycomputer.CacheKeyComputer(build_env)
for source in set(a.source for a in system_artifact.walk()):
- artifact.cache_key = ckc.compute_key(artifact)
- artifact.cache_id = ckc.get_cache_id(artifact)
+ source.cache_key = ckc.compute_key(source)
+ source.cache_id = ckc.get_cache_id(source)
artifact_files = set()
for artifact in system_artifact.walk():
@@ -120,8 +121,8 @@ class ListArtifactsPlugin(cliapp.Plugin):
# This is unfortunate hardwiring of behaviour; in future we
# should list all artifacts in the meta-artifact file, so we
# don't have to guess what files there will be.
- artifact_files.add('%s.meta' % artifact.cache_key)
+ artifact_files.add('%s.meta' % artifact.source.cache_key)
if artifact.source.morphology['kind'] == 'chunk':
- artifact_files.add('%s.build-log' % artifact.cache_key)
+ artifact_files.add('%s.build-log' % artifact.source.cache_key)
return artifact_files