summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-21 14:34:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-22 13:07:07 +0000
commitd43175e747d6982cf3ca1a463eafc960b67966e2 (patch)
treeaf37c43430e090430d5190028d8792692befcc3f /bitbake
parent17a92c4c9801396ce6aa82f7c1532b49b18dbad4 (diff)
downloadast2050-yocto-poky-d43175e747d6982cf3ca1a463eafc960b67966e2.zip
ast2050-yocto-poky-d43175e747d6982cf3ca1a463eafc960b67966e2.tar.gz
bitbake/runqueue.py: Add BB_SETSCENE_VERIFY_FUNCTION hook
The OE metadata has cases where it needs to prevent some setscene functions from running. An example of this is where we know a task is going to run do_configure (which would clean out do_populate_sysroot) and hence we don't want do_populate_sysroot_setscene to run. This change adds in a hook so that the metadata can allow any such policy decision to filter back up to bitbake. It removes the existing code which attempted to do this in a generic way but failed. (Bitbake rev: 2f6d987d9957a5d713ce119c24c2e87540611f53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index d82ce36..1ed729d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -767,6 +767,7 @@ class RunQueue:
self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, True) or "perfile"
self.hashvalidate = bb.data.getVar("BB_HASHCHECK_FUNCTION", cfgData, True) or None
+ self.setsceneverify = bb.data.getVar("BB_SETSCENE_VERIFY_FUNCTION", cfgData, True) or None
self.state = runQueuePrepare
@@ -1217,23 +1218,20 @@ class RunQueueExecuteTasks(RunQueueExecute):
if found:
self.rq.scenequeue_covered.add(task)
- # Detect when the real task needs to be run anyway by looking to see
- # if any of its dependencies within the same package are scheduled
- # to be run.
+ logger.debug(1, 'Skip list (pre setsceneverify) %s', sorted(self.rq.scenequeue_covered))
+
+ # Allow the metadata to elect for setscene tasks to run anyway
covered_remove = set()
- for task in self.rq.scenequeue_covered:
- task_fnid = self.rqdata.runq_fnid[task]
- for dep in self.rqdata.runq_depends[task]:
- if self.rqdata.runq_fnid[dep] == task_fnid:
- if dep not in self.rq.scenequeue_covered:
- covered_remove.add(task)
- break
+ if self.rq.setsceneverify:
+ call = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d)"
+ locs = { "covered" : self.rq.scenequeue_covered, "tasknames" : self.rqdata.runq_task, "fnids" : self.rqdata.runq_fnid, "fns" : self.rqdata.taskData.fn_index, "d" : self.cooker.configuration.data }
+ covered_remove = bb.utils.better_eval(call, locs)
for task in covered_remove:
fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
taskname = self.rqdata.runq_task[task] + '_setscene'
bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
- logger.debug(1, 'Not skipping task %s because it will have to be run anyway', task)
+ logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
self.rq.scenequeue_covered.remove(task)
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
OpenPOWER on IntegriCloud