aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/command.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-09 18:27:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-12 17:48:13 +0100
commita98f698fe9f38310024013e58475e6d1447ee154 (patch)
treead78da54c4529a43ed224e98a01fd65590c36309 /lib/bb/command.py
parent6c382c2ee7740a5e78b4135648870e5c181ec23f (diff)
downloadbitbake-a98f698fe9f38310024013e58475e6d1447ee154.tar.gz
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 <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'lib/bb/command.py')
-rw-r--r--lib/bb/command.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 893a6d907..41796f629 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -172,6 +172,13 @@ class CommandsSync:
value = params[1]
bb.data.setVar(varname, value, command.cooker.configuration.data)
+ def resetCooker(self, command, params):
+ """
+ Reset the cooker to its initial state, thus forcing a reparse for
+ any async command that has the needcache property set to True
+ """
+ command.cooker.reset()
+
class CommandsAsync:
"""