summaryrefslogtreecommitdiff
path: root/morphlib/artifactresolver.py
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2014-10-05 20:23:58 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-10-09 10:34:49 +0100
commit78e3b858bb15e5df66a3b1c7c286643726d45388 (patch)
treeeb33aef7333ecc8b2ca3485223fe1eaeeab3dfdb /morphlib/artifactresolver.py
parent6fdb886894dd320494fb386ecb6fe9f89ce874aa (diff)
downloadmorph-78e3b858bb15e5df66a3b1c7c286643726d45388.tar.gz
Tidy up artifact resolving
This patch started off as an attempt to address the comment in find_root_artifacts, though this patch doesn't impose an ordering on the list of artifacts as the comment suggested. The artifact resolver now returns a list of root artifacts which may make it easier to add multi-system builds to morph.
Diffstat (limited to 'morphlib/artifactresolver.py')
-rw-r--r--morphlib/artifactresolver.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py
index 5deb25b7..8c8b37d0 100644
--- a/morphlib/artifactresolver.py
+++ b/morphlib/artifactresolver.py
@@ -52,7 +52,11 @@ class ArtifactResolver(object):
self._added_artifacts = None
self._source_pool = None
- def resolve_artifacts(self, source_pool):
+ def resolve_root_artifacts(self, source_pool): #pragma: no cover
+ return [a for a in self._resolve_artifacts(source_pool)
+ if not a.dependents]
+
+ def _resolve_artifacts(self, source_pool):
self._source_pool = source_pool
self._added_artifacts = set()