diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-10-01 22:11:42 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-10-08 12:13:56 +0000 |
commit | 2689f61a305ec576f229f1d9f0929d7eb11d1acc (patch) | |
tree | 85e4e0259360d8f824b1ee775f0511f939284d50 /distbuild/build_controller.py | |
parent | f814cf6c4a8cae6b5a28349897626d42f5fd9f9e (diff) | |
download | morph-2689f61a305ec576f229f1d9f0929d7eb11d1acc.tar.gz |
Fix issues with distbuild caused by moving to building per-source
Diffstat (limited to 'distbuild/build_controller.py')
-rw-r--r-- | distbuild/build_controller.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py index e8a8dc37..93f97fac 100644 --- a/distbuild/build_controller.py +++ b/distbuild/build_controller.py @@ -142,7 +142,7 @@ def map_build_graph(artifact, callback): a = queue.pop() if a not in done: result.append(callback(a)) - queue.extend(a.dependencies) + queue.extend(a.source.dependencies) done.add(a) return result @@ -388,7 +388,8 @@ class BuildController(distbuild.StateMachine): def _find_artifacts_that_are_ready_to_build(self): def is_ready_to_build(artifact): return (artifact.state == UNBUILT and - all(a.state == BUILT for a in artifact.dependencies)) + all(a.state == BUILT + for a in artifact.source.dependencies)) return [a for a in map_build_graph(self._artifact, lambda a: a) @@ -424,7 +425,7 @@ class BuildController(distbuild.StateMachine): logging.debug( 'Requesting worker-build of %s (%s)' % - (artifact.name, artifact.cache_key)) + (artifact.name, artifact.source.cache_key)) request = distbuild.WorkerBuildRequest(artifact, self._request['id']) self.mainloop.queue_event(distbuild.WorkerBuildQueuer, request) @@ -540,7 +541,7 @@ class BuildController(distbuild.StateMachine): def _find_artifact(self, cache_key): artifacts = map_build_graph(self._artifact, lambda a: a) - wanted = [a for a in artifacts if a.cache_key == cache_key] + wanted = [a for a in artifacts if a.source.cache_key == cache_key] if wanted: return wanted[0] else: @@ -637,7 +638,7 @@ class BuildController(distbuild.StateMachine): baseurl = urlparse.urljoin( self._artifact_cache_server, '/1.0/artifacts') filename = ('%s.%s.%s' % - (self._artifact.cache_key, + (self._artifact.source.cache_key, self._artifact.source.morphology['kind'], self._artifact.name)) url = '%s?filename=%s' % (baseurl, urllib.quote(filename)) |