Patchwork [bitbake-devel] command: Trigger updateCache to shut down any active parser threads

mail settings
Submitter Richard Purdie
Date Aug. 21, 2014, 8:45 p.m.
Message ID <1408653952.1669.115.camel@ted>
Download mbox | patch
Permalink /patch/78765/
State New
Headers show


Richard Purdie - Aug. 21, 2014, 8:45 p.m.
If we trigger a shutdown whilst parsing for whatever reason, in some
cases we were not closing down the parser threads. This change
ensures we do so. The function names are not entirely intuitive
but the behaviour is more correct (and commented). The previous bug
with the stdout failure would trigger this one, if there was a cold
cache and parsing was required (but not otherwise).

Signed-off-by: Richard Purdie <>


diff --git a/bitbake/lib/bb/ b/bitbake/lib/bb/
index d797fcf..0cfed0a 100644
--- a/bitbake/lib/bb/
+++ b/bitbake/lib/bb/
@@ -87,6 +87,9 @@  class Command:
     def runAsyncCommand(self):
             if self.cooker.state in (bb.cooker.state.error, bb.cooker.state.shutdown, bb.cooker.state.forceshutdown):
+                # updateCache will trigger a shutdown of the parser
+                # and then raise BBHandledException triggering an exit
+                self.cooker.updateCache()
                 return False
             if self.currentAsyncCommand is not None:
                 (command, options) = self.currentAsyncCommand