From 71bc61f4426273cef6d001d19fa745731df303cd Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 24 Jun 2015 11:02:39 +0100 Subject: 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 --- distbuild/build_controller.py | 5 +++-- 1 file 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)) -- cgit v1.2.1