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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1dff47b097
commit
c34bb765fa
|
@ -90,8 +90,7 @@ class Command:
|
||||||
(command, options) = self.currentAsyncCommand
|
(command, options) = self.currentAsyncCommand
|
||||||
commandmethod = getattr(CommandsAsync, command)
|
commandmethod = getattr(CommandsAsync, command)
|
||||||
needcache = getattr( commandmethod, "needcache" )
|
needcache = getattr( commandmethod, "needcache" )
|
||||||
if (needcache and self.cooker.state in
|
if needcache and self.cooker.state != bb.cooker.state.running:
|
||||||
(bb.cooker.state.initial, bb.cooker.state.parsing)):
|
|
||||||
self.cooker.updateCache()
|
self.cooker.updateCache()
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1168,6 +1168,7 @@ class BBCooker:
|
||||||
if timestamp:
|
if timestamp:
|
||||||
return timestr
|
return timestr
|
||||||
|
|
||||||
|
# This is called for all async commands when self.state != running
|
||||||
def updateCache(self):
|
def updateCache(self):
|
||||||
if self.state == state.running:
|
if self.state == state.running:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue