summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-20 14:44:59 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-20 14:44:59 +0000
commit709f43da19e01af505cae278790018d9a07b7e3b (patch)
treeba7cc35e812956e0822be73210cbd8d58b32577a
parentcf436f119567ce7190b495a86dd043a707c3f2e9 (diff)
downloadmorph-709f43da19e01af505cae278790018d9a07b7e3b.tar.gz
fixup: Report the right things when done
Change-Id: I9a7ac78844273dbc2dc51a50cab91f02960c544b
-rw-r--r--distbuild/build_controller.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 23c37f68..58d89cdf 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -661,10 +661,19 @@ class BuildController(distbuild.StateMachine):
logging.debug('Notifying initiator of successful build')
baseurl = urlparse.urljoin(
self._artifact_cache_server, '/1.0/artifacts')
- filename = ('%s.%s.%s' %
- (self._artifact.source.cache_key,
- self._artifact.source.morphology['kind'],
- self._artifact.name))
- url = '%s?filename=%s' % (baseurl, urllib.quote(filename))
- finished = BuildFinished(self._request['id'], [url])
+ urls = []
+ for c in self._components:
+ name = ('%s.%s.%s' %
+ (c.source.cache_key,
+ c.source.morphology['kind'],
+ c.name))
+ urls.append('%s?filename=%s' % (baseurl, urllib.quote(name))
+ if not self._components:
+ name = ('%s.%s.%s' %
+ (self._artifact.source.cache_key,
+ self._artifact.source.morphology['kind'],
+ self._artifact.name))
+ urls.append('%s?filename=%s' % (baseurl, urllib.quote(name))
+
+ finished = BuildFinished(self._request['id'], urls)
self.mainloop.queue_event(BuildController, finished)