summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.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:10:32 +0100
commit5bd11a9bf329217f312076f347b045b5c09f19b2 (patch)
tree83714e56d5ba70a16cac099af85f7674300b1ba1 /bitbake/lib/bb/runqueue.py
parentabc0bef595bbedf1fea8c6e0b1dc0c0becdd5b17 (diff)
downloadpoky-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/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index d925b4c2b7..28eb072bee 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -705,6 +705,12 @@ class RunQueueData:
705 continue 705 continue
706 self.runq_setscene.append(task) 706 self.runq_setscene.append(task)
707 707
708 # Invalidate task if force mode active
709 if self.cooker.configuration.force:
710 for (fn, target) in self.target_pairs:
711 logger.verbose("Invalidate task %s, %s", target, fn)
712 bb.parse.siggen.invalidate_task(target, self.dataCache, fn)
713
708 # Interate over the task list and call into the siggen code 714 # Interate over the task list and call into the siggen code
709 dealtwith = set() 715 dealtwith = set()
710 todeal = set(range(len(self.runq_fnid))) 716 todeal = set(range(len(self.runq_fnid)))
@@ -731,12 +737,6 @@ class RunQueueData:
731 deps.append(depidentifier) 737 deps.append(depidentifier)
732 self.hash_deps[identifier] = deps 738 self.hash_deps[identifier] = deps
733 739
734 # Remove stamps for targets if force mode active
735 if self.cooker.configuration.force:
736 for (fn, target) in self.target_pairs:
737 logger.verbose("Remove stamp %s, %s", target, fn)
738 bb.build.del_stamp(target, self.dataCache, fn)
739
740 return len(self.runq_fnid) 740 return len(self.runq_fnid)
741 741
742 def dump_data(self, taskQueue): 742 def dump_data(self, taskQueue):