From: Richard Purdie Date: Mon, 26 Aug 2013 12:41:03 +0000 (+0000) Subject: bitbake: command.py: Call updateCache for all states != running X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c34bb765fa79e82ea31d0e1b09263c4394f7c37b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: command.py: Call updateCache for all states != running updateCache handles the logic for shutting down the parsing so we need to call it for all cases when we're not running. This fixes hangs if Ctrl+C is pressed during parsing. (Bitbake rev: 552b8935dd2f9f11e8d5c08a597a7e966b891480) Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index bdf1c36636b..3527ad03c12 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -90,8 +90,7 @@ class Command: (command, options) = self.currentAsyncCommand commandmethod = getattr(CommandsAsync, command) needcache = getattr( commandmethod, "needcache" ) - if (needcache and self.cooker.state in - (bb.cooker.state.initial, bb.cooker.state.parsing)): + if needcache and self.cooker.state != bb.cooker.state.running: self.cooker.updateCache() return True else: diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 97210ba4e38..5a848042f34 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1168,6 +1168,7 @@ class BBCooker: if timestamp: return timestr + # This is called for all async commands when self.state != running def updateCache(self): if self.state == state.running: return