From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] cooker.py: Allow parsing shutdown to be called more than once
Date: Sun, 11 Mar 2012 14:34:32 +0000 [thread overview]
Message-ID: <1331476472.15192.0.camel@ted> (raw)
The parsing shutdown call can occur more than once. Currently
if this happens the code will hang. Add some code to prevent this.
[YOCTO #2039 partial]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/cooker.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 451f1e9..78d8754 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1556,6 +1556,7 @@ class CookerParser(object):
self.progress_chunk = max(self.toparse / 100, 1)
self.start()
+ self.haveshutdown = False
def start(self):
self.results = self.load_cached()
@@ -1582,6 +1583,9 @@ class CookerParser(object):
def shutdown(self, clean=True, force=False):
if not self.toparse:
return
+ if self.haveshutdown:
+ return
+ self.haveshutdown = True
if clean:
event = bb.event.ParseCompleted(self.cached, self.parsed,
reply other threads:[~2012-03-11 14:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1331476472.15192.0.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