diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index bdf1c36636..3527ad03c1 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 97210ba4e3..5a848042f3 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