From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] command/runqueue: Fix shutdown logic
Date: Mon, 21 Jul 2014 09:35:53 +0100 [thread overview]
Message-ID: <1405931753.22985.93.camel@ted> (raw)
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>
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 84fcdf9..d797fcf 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -86,7 +86,7 @@ class Command:
def runAsyncCommand(self):
try:
- if self.cooker.state == bb.cooker.state.error:
+ if self.cooker.state in (bb.cooker.state.error, bb.cooker.state.shutdown, bb.cooker.state.forceshutdown):
return False
if self.currentAsyncCommand is not None:
(command, options) = self.currentAsyncCommand
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 4ea4970..f68a11d 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 v0.10.1
next reply other threads:[~2014-07-21 8:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 8:35 Richard Purdie [this message]
2014-07-22 14:46 ` [PATCH] command/runqueue: Fix shutdown logic Martin Jansa
2014-07-22 18:10 ` Richard Purdie
2014-07-22 18:51 ` Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405931753.22985.93.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox