diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-06-18 16:45:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-21 13:10:32 +0100 |
commit | 5bd11a9bf329217f312076f347b045b5c09f19b2 (patch) | |
tree | 83714e56d5ba70a16cac099af85f7674300b1ba1 /bitbake/lib/bb/cooker.py | |
parent | abc0bef595bbedf1fea8c6e0b1dc0c0becdd5b17 (diff) | |
download | poky-5bd11a9bf329217f312076f347b045b5c09f19b2.tar.gz |
bitbake: 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].
(Bitbake rev: f7b55a94226f9acd985f87946e26d01bd86a35bb)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 928b6009aa..9b8d4b23e5 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1066,10 +1066,10 @@ class BBCooker: | |||
1066 | self.status.rundeps[fn] = [] | 1066 | self.status.rundeps[fn] = [] |
1067 | self.status.runrecs[fn] = [] | 1067 | self.status.runrecs[fn] = [] |
1068 | 1068 | ||
1069 | # Remove stamp for target if force mode active | 1069 | # Invalidate task for target if force mode active |
1070 | if self.configuration.force: | 1070 | if self.configuration.force: |
1071 | logger.verbose("Remove stamp %s, %s", task, fn) | 1071 | logger.verbose("Invalidate task %s, %s", task, fn) |
1072 | bb.build.del_stamp('do_%s' % task, self.status, fn) | 1072 | bb.parse.siggen.invalidate_task('do_%s' % task, self.status, fn) |
1073 | 1073 | ||
1074 | # Setup taskdata structure | 1074 | # Setup taskdata structure |
1075 | taskdata = bb.taskdata.TaskData(self.configuration.abort) | 1075 | taskdata = bb.taskdata.TaskData(self.configuration.abort) |