summaryrefslogtreecommitdiffstats
path: root/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-06-18 16:45:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:05:08 +0100
commit2530e0faada5775897cfd1b93aba6925826dca73 (patch)
tree1121b0bd98c112f046b87b9ad3a1a8d98b3aa4ed /lib/bb/runqueue.py
parentf7b55a94226f9acd985f87946e26d01bd86a35bb (diff)
downloadbitbake-2530e0faada5775897cfd1b93aba6925826dca73.tar.gz
bitbake: add -C option to invalidate a task and rebuild the target
This new command line option forces the specified task and all dependent tasks up to the default task to re-run. This means that the following single step: bitbake -C compile somerecipe is equivalent to the following two steps (with the recent change to -f): bitbake -c compile -f somerecipe bitbake somerecipe Note that to work this option needs 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, -C effectively does nothing. Based on a previous implementation of this option by Jason Wessel <jason.wessel@windriver.com>. Implements [YOCTO #2615]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r--lib/bb/runqueue.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 28eb072be..608aff8ad 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -705,11 +705,27 @@ class RunQueueData:
continue
self.runq_setscene.append(task)
+ def invalidate_task(fn, taskname, error_nostamp):
+ taskdep = self.dataCache.task_deps[fn]
+ if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
+ if error_nostamp:
+ bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname)
+ else:
+ bb.debug(1, "Task %s is marked nostamp, cannot invalidate this task" % taskname)
+ else:
+ logger.verbose("Invalidate task %s, %s", taskname, fn)
+ bb.parse.siggen.invalidate_task(taskname, self.dataCache, fn)
+
# Invalidate task if force mode active
if self.cooker.configuration.force:
for (fn, target) in self.target_pairs:
- logger.verbose("Invalidate task %s, %s", target, fn)
- bb.parse.siggen.invalidate_task(target, self.dataCache, fn)
+ invalidate_task(fn, target, False)
+
+ # Invalidate task if invalidate mode active
+ if self.cooker.configuration.invalidate_stamp:
+ for (fn, target) in self.target_pairs:
+ for st in self.cooker.configuration.invalidate_stamp.split(','):
+ invalidate_task(fn, "do_%s" % st, True)
# Interate over the task list and call into the siggen code
dealtwith = set()