diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-03-14 16:36:54 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-03-26 21:58:44 +0000 |
commit | a4d2de0411030eab8832a625734e7d65d5efbec6 (patch) | |
tree | 74b33fc419d386852b74aa899f9ff98b68a82d49 /distbuild | |
parent | 66d2165dc7a5e0183f83128170625ee19cf829e3 (diff) | |
download | morph-a4d2de0411030eab8832a625734e7d65d5efbec6.tar.gz |
Transfer all chunk artifacts after they are built
We want to be able to transfer all
source artifacts in a single transaction
Diffstat (limited to 'distbuild')
-rw-r--r-- | distbuild/worker_build_scheduler.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/distbuild/worker_build_scheduler.py b/distbuild/worker_build_scheduler.py index d0f158b6..315d3094 100644 --- a/distbuild/worker_build_scheduler.py +++ b/distbuild/worker_build_scheduler.py @@ -327,17 +327,22 @@ class WorkerConnection(distbuild.StateMachine): logging.debug('Requesting shared artifact cache to get artifacts') - filename = ('%s.%s' % - (self._artifact.source.morphology['kind'], - self._artifact.name)) - suffixes = [filename] kind = self._artifact.source.morphology['kind'] - if kind == 'stratum': - suffixes.append(filename + '.meta') - elif kind == 'system': - # FIXME: This is a really ugly hack. - if filename.endswith('-rootfs'): - suffixes.append(filename[:-len('-rootfs')] + '-kernel') + + if kind == 'chunk': + source_artifacts = self._artifact.source.artifacts + + suffixes = ['%s.%s' % (kind, name) for name in source_artifacts] + else: + filename = '%s.%s' % (kind, self._artifact.name) + suffixes = [filename] + + if kind == 'stratum': + suffixes.append(filename + '.meta') + elif kind == 'system': + # FIXME: This is a really ugly hack. + if filename.endswith('-rootfs'): + suffixes.append(filename[:-len('-rootfs')] + '-kernel') suffixes = [urllib.quote(x) for x in suffixes] suffixes = ','.join(suffixes) |