From 19265918768e49d465352c36be1ae9ea21f4b5b2 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 9 Aug 2011 18:27:51 -0700 Subject: bb/command|cooker: refactor the reparseFiles logic Turn the reparseFiles logic into a command to reset the cooker's state machine and a noop which triggers a cache rebuild. The resetCooker command resets the cookers state machine such that a cache update will be triggered by any async command which requires the cache. The reparseFiles command remains as a noop async command that has the needcache property set to True so that when called it ensures the cache is built. Patch from Richard with the addition of removing the force parameter from the updateCache method. CC: Richard Purdie (Bitbake rev: a98f698fe9f38310024013e58475e6d1447ee154) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 490828d2a6..f7d9923f19 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1104,8 +1104,8 @@ class BBCooker: self.server_registration_cb(buildTargetsIdle, rq) - def updateCache(self, force=False): - if self.state == state.running and not force: + def updateCache(self): + if self.state == state.running: return if self.state in (state.shutdown, state.stop): @@ -1290,8 +1290,11 @@ class BBCooker: self.state = state.stop def reparseFiles(self): + return + + def reset(self): + self.state = state.initial self.loadConfigurationData() - self.updateCache(force=True) def server_main(cooker, func, *args): cooker.pre_serve() -- cgit v1.2.3-54-g00ecf