From 13a03f2e9c0c94a083664d0081296f74746a6746 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 21 Jul 2014 09:35:53 +0100 Subject: bitbake: command/runqueue: Fix shutdown logic If you hit Ctrl+C at the right point, the system processes the request but merrily continues building. It turns out finish_runqueue() is called but this doesn't stop the later generation and execution of the runqueue. This patch adjusts some of the conditionals to ensure the build really does stop. (Bitbake rev: 39b08c604ba713100e174c136f81f18eca6ef33d) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 4ea4970127..f68a11d90d 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1065,7 +1065,7 @@ class RunQueue: if self.state is runQueueCleanUp: self.rqexe.finish() - if self.state is runQueueComplete or self.state is runQueueFailed: + if (self.state is runQueueComplete or self.state is runQueueFailed) and self.rqexe: self.teardown_workers() if self.rqexe.stats.failed: logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed + self.rqexe.stats.failed, self.rqexe.stats.skipped, self.rqexe.stats.failed) @@ -1106,6 +1106,7 @@ class RunQueue: def finish_runqueue(self, now = False): if not self.rqexe: + self.state = runQueueComplete return if now: -- cgit v1.2.3-54-g00ecf