summaryrefslogtreecommitdiffstats
path: root/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-21 09:35:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-21 11:00:48 +0100
commit39b08c604ba713100e174c136f81f18eca6ef33d (patch)
tree0d13dcd5e9d4d24bb8f1141efcac8215bec8b803 /lib/bb/runqueue.py
parent021b778fa4685bdde39e1a0f6c7c57632dcf792a (diff)
downloadbitbake-contrib-39b08c604ba713100e174c136f81f18eca6ef33d.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r--lib/bb/runqueue.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 4ea497012..f68a11d90 100644
--- a/lib/bb/runqueue.py
+++ b/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: