diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-10 12:40:47 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-10 14:59:31 +0100 |
commit | ada45fec664a120bb313d929bedc1645d3feff58 (patch) | |
tree | 916c6629b0e80a820683d36daf493200c0053f9f /morphlib/plugins/list_artifacts_plugin.py | |
parent | 120b16734079e5899b04f76a8c3c37c9a3ae8b3a (diff) | |
download | morph-ada45fec664a120bb313d929bedc1645d3feff58.tar.gz |
Fix the `morph list-artifacts` command
It was broken by the per-source building changes.
Diffstat (limited to 'morphlib/plugins/list_artifacts_plugin.py')
-rw-r--r-- | morphlib/plugins/list_artifacts_plugin.py | 13 |
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 |