summaryrefslogtreecommitdiff
path: root/morphlib/artifactresolver.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-08-28 17:20:04 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-30 11:19:01 +0000
commit2a071ef057c953e81e1b8bd9b714373b4dbb26c2 (patch)
treebffd06cb8a9d0c825cdc2274b7b4c55adc07def6 /morphlib/artifactresolver.py
parentecefb2d1936221ccf21cbad6db2fe73cd229f4f5 (diff)
downloadmorph-2a071ef057c953e81e1b8bd9b714373b4dbb26c2.tar.gz
Strata should be referred to with full repo/ref/morph triplets
This removes the requirement that all strata must be in the same repo as the system morphology. Both the system "strata" field and the stratum "build-depends" field are affected.
Diffstat (limited to 'morphlib/artifactresolver.py')
-rw-r--r--morphlib/artifactresolver.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py
index c6e7fbf3..aed3c9c4 100644
--- a/morphlib/artifactresolver.py
+++ b/morphlib/artifactresolver.py
@@ -153,12 +153,13 @@ class ArtifactResolver(object):
def _resolve_system_dependencies(self, systems, source, queue):
artifacts = []
- for stratum_name in source.morphology['strata']:
+ for info in source.morphology['strata']:
stratum_source = self._source_pool.lookup(
- source.repo_name,
- source.original_ref,
- '%s.morph' % stratum_name)
+ info['repo'],
+ info['ref'],
+ '%s.morph' % info['morph'])
+ stratum_name = stratum_source.morphology.builds_artifacts[0]
stratum = self._get_artifact(stratum_source, stratum_name)
for system in systems:
@@ -175,13 +176,14 @@ class ArtifactResolver(object):
strata = []
if stratum.source.morphology['build-depends']:
- for stratum_name in stratum.source.morphology['build-depends']:
+ for stratum_info in stratum.source.morphology['build-depends']:
other_source = self._source_pool.lookup(
- stratum.source.repo_name,
- stratum.source.original_ref,
- '%s.morph' % stratum_name)
+ stratum_info['repo'],
+ stratum_info['ref'],
+ '%s.morph' % stratum_info['morph'])
- other_stratum = self._get_artifact(other_source, stratum_name)
+ other_stratum = self._get_artifact(
+ other_source, other_source.morphology.builds_artifacts[0])
strata.append(other_stratum)