From a4d2de0411030eab8832a625734e7d65d5efbec6 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 14 Mar 2014 16:36:54 +0000 Subject: Transfer all chunk artifacts after they are built We want to be able to transfer all source artifacts in a single transaction --- distbuild/worker_build_scheduler.py | 25 +++++++++++++++---------- 1 file 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) -- cgit v1.2.1