[bitbake-devel] [RFC] bitbake: respect force flag in runall and runonly
Joshua Watt
jpewhacker at gmail.com
Tue Mar 27 18:34:27 UTC 2018
Specifying the force flag will now cause runall and runonly to
invalidate the tasks before running them.
Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
---
bitbake/lib/bb/runqueue.py | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f2e52cf758c..9ae5c9cb177 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -795,6 +795,21 @@ class RunQueueData:
for depend in depends:
mark_active(depend, depth+1)
+ def invalidate_task(tid, error_nostamp):
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+ taskdep = self.dataCaches[mc].task_deps[taskfn]
+ if fn + ":" + taskname not in taskData[mc].taskentries:
+ logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
+ 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.dataCaches[mc], fn)
+
+
self.target_tids = []
for (mc, target, task, fn) in self.targets:
@@ -863,6 +878,8 @@ class RunQueueData:
for tid in list(runall_tids):
mark_active(tid,1)
+ if self.cooker.configuration.force:
+ invalidate_task(tid, False)
for tid in list(self.runtaskentries.keys()):
if tid not in runq_build:
@@ -884,6 +901,8 @@ class RunQueueData:
for tid in list(runonly_tids):
mark_active(tid,1)
+ if self.cooker.configuration.force:
+ invalidate_task(tid, False)
for tid in list(self.runtaskentries.keys()):
if tid not in runq_build:
@@ -1040,7 +1059,7 @@ class RunQueueData:
# Create a whitelist usable by the stamp checks
self.stampfnwhitelist = {}
- for mc in self.taskData:
+ for mc in self.taskData:
self.stampfnwhitelist[mc] = []
for entry in self.stampwhitelist.split():
if entry not in self.taskData[mc].build_targets:
@@ -1060,20 +1079,6 @@ class RunQueueData:
continue
self.runq_setscene_tids.append(tid)
- def invalidate_task(tid, error_nostamp):
- (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
- taskdep = self.dataCaches[mc].task_deps[taskfn]
- if fn + ":" + taskname not in taskData[mc].taskentries:
- logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
- 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.dataCaches[mc], fn)
-
self.init_progress_reporter.next_stage()
# Invalidate task if force mode active
--
2.14.3
More information about the bitbake-devel
mailing list