summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-06-24 11:02:39 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-06-24 11:09:30 +0100
commit71bc61f4426273cef6d001d19fa745731df303cd (patch)
tree82ebbee6fd1ac2c36aafd756f51bce2b1a6a4845
parent23ccce8d0af156de8658af310139b3aacb9cb889 (diff)
downloadmorph-71bc61f4426273cef6d001d19fa745731df303cd.tar.gz
distbuild: Fix cache status message
The initiator would always say "Need to build 260/260 artifacts" even when it didn't need to build everything, because we were counting the number of unbuilt artifacts wrongly. Change-Id: I5da88157dba59949597c58a983f7b31975c52d7f
-rw-r--r--distbuild/build_controller.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 3aa149f8..bfd910b2 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -604,7 +604,8 @@ class BuildController(distbuild.StateMachine):
'''Send 'Need to build xx/yy artifacts' message.'''
if len(self._components) == 0:
- unbuilt = {a.cache_key for a in self._artifact.walk()}
+ unbuilt = {a.cache_key for a in self._artifact.walk()
+ if a.state == UNBUILT}
else:
# Partial distbuild
unbuilt = set()
@@ -619,7 +620,7 @@ class BuildController(distbuild.StateMachine):
total = set()
for c in self._components:
total.update(
- {a.cache_key for a in c.walk() if a.state == UNBUILT})
+ {a.cache_key for a in c.walk()})
cache_state_msg = CacheState(
self._request['id'], len(unbuilt), len(total))