summaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-06-18 16:45:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:04:34 +0100
commitf7b55a94226f9acd985f87946e26d01bd86a35bb (patch)
tree52040ceb6c753f0c98c687e42e6fb2a24b49f75a /lib/bb/cooker.py
parentd316f28ed725ff40daa8771c1aa224ac46d5b224 (diff)
downloadbitbake-f7b55a94226f9acd985f87946e26d01bd86a35bb.tar.gz
bitbake: ensure -f causes dependent tasks to be re-run
If -f is specified, force dependent tasks to be re-run next time. This works by changing the force behaviour so that instead of deleting the task's stamp, we write a "taint" file into the stamps directory, which will alter the taskhash randomly and thus trigger the task to re-run next time we evaluate whether or not that should be done as well as influencing the taskhashes of any dependent tasks so that they are similarly re-triggered. As a bonus because we write this file as <stamp file name>.taskname.taint, the existing code which deletes the stamp files in OE's do_clean will already handle removing it. This means you can now do the following: bitbake somepackage [ change the source code in the package's WORKDIR ] bitbake -c compile -f somepackage bitbake somepackage and the result will be that all of the tasks that depend on do_compile (do_install, do_package, etc.) will be re-run in the last step. Note that to operate in the manner described above you need full hashing enabled (i.e. BB_SIGNATURE_HANDLER must be set to a signature handler that inherits from BasicHash). If this is not the case, -f will just delete the stamp for the specified task as it did before. This fix is required for [YOCTO #2615] and [YOCTO #2256]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 928b6009a..9b8d4b23e 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1066,10 +1066,10 @@ class BBCooker:
self.status.rundeps[fn] = []
self.status.runrecs[fn] = []
- # Remove stamp for target if force mode active
+ # Invalidate task for target if force mode active
if self.configuration.force:
- logger.verbose("Remove stamp %s, %s", task, fn)
- bb.build.del_stamp('do_%s' % task, self.status, fn)
+ logger.verbose("Invalidate task %s, %s", task, fn)
+ bb.parse.siggen.invalidate_task('do_%s' % task, self.status, fn)
# Setup taskdata structure
taskdata = bb.taskdata.TaskData(self.configuration.abort)