[bitbake-devel] [PATCH v4 15/18] bitbake, runqueue.py: Add -i to invalidate a stamp and rebuild the target
Jason Wessel
jason.wessel at windriver.com
Fri Jun 8 13:41:50 UTC 2012
It is highly desirable to be able to invalidate a stamp used for
do_compile and to be able to continue on to build the entire
package's build rule.
If invalidating a stamp, the setscene rules for the specified targets
should be automatically canceled so as to allow a forced build
of an individual target.
Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
bin/bitbake | 3 +++
lib/bb/runqueue.py | 13 ++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/bin/bitbake b/bin/bitbake
index 702d99c..bf81a0c 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -150,6 +150,9 @@ Default BBFILES are the .bb files in the current directory.""")
parser.add_option("-I", "--ignore-deps", help = """Assume these dependencies don't exist and are already provided (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more appealing""",
action = "append", dest = "extra_assume_provided", default = [])
+ parser.add_option("-i", "--invalidate-stamp", help = "Invalidate the specified stamp for a command such as 'compile' and build",
+ action = "store", dest = "invalidate_stamp")
+
parser.add_option("-l", "--log-domains", help = """Show debug logging for the specified logging domains""",
action = "append", dest = "debug_domains", default = [])
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 6c802af..3dbfaad 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -720,10 +720,14 @@ class RunQueueData:
self.runq_hash[task] = bb.parse.siggen.get_taskhash(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task], procdep, self.dataCache)
try:
new_setscene = []
+ test_fns = []
+ if self.cooker.configuration.invalidate_stamp:
+ for tgt in self.target_pairs:
+ test_fns.append(tgt[0])
for task in self.runq_setscene:
try:
fn = self.taskData.fn_index[self.rq.rqdata.runq_fnid[task]]
- if bb.build.exists_stamp("do_unpack", self.dataCache, fn):
+ if bb.build.exists_stamp("do_unpack", self.dataCache, fn) or (self.cooker.configuration.invalidate_stamp and fn in test_fns):
logger.debug(2, 'Removing task %s from queue because do_unpack exists', task)
else:
new_setscene.append(task)
@@ -746,6 +750,13 @@ class RunQueueData:
deps.append(depidentifier)
self.hash_deps[identifier] = deps
+ # Remove stamps for forced invalidation
+ if self.cooker.configuration.invalidate_stamp:
+ for (fn, target) in self.target_pairs:
+ for st in self.cooker.configuration.invalidate_stamp.split(','):
+ logger.verbose("Remove stamp %s, %s", st, fn)
+ bb.build.del_stamp("do_%s" % st, self.dataCache, fn)
+
# Remove stamps for targets if force mode active
if self.cooker.configuration.force:
for (fn, target) in self.target_pairs:
--
1.7.10
More information about the bitbake-devel
mailing list