summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-25 18:58:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-26 14:55:22 +0100
commit0984853cedca11a748076b788c4fc9c561ecb291 (patch)
tree1becdbb8db7560e1c396a9807efedb45b2b4b429 /bitbake/lib
parentb22592af8145a8c7c4ada2fa7c1dee2e753eca46 (diff)
downloadpoky-0984853cedca11a748076b788c4fc9c561ecb291.tar.gz
bitbake: runqueue.py: Allow the setsceneverify function to have a list of tasks that are invalid and need to run
There was some odd behaviour if some task was run from setcene whilst there were existing valid stamps for a depepdency. For example, do_populate_sysroot might be installed at setscene time but if there were other tasks not installed from setscene such as do_populate_lic which depend on do_configure, the setsceneverify function would think that do_configure needed to be rerun and would hence void the do_populate_sysroot and force that to rerun too. The setsceneverify function needs to know which tasks are going to be rerun, not just what the overall task list is and what setscene functions have run. This patch adds that information and maintains backwards compatibility in a slightly ugly but effective way. The metadata needs updating to take advantage of this change. (Bitbake rev: 1423aafff97f17169e95ec3ba973eb002ff98c1c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index a4009d4e9b..ca5fe970d2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1206,9 +1206,30 @@ class RunQueueExecuteTasks(RunQueueExecute):
1206 # Allow the metadata to elect for setscene tasks to run anyway 1206 # Allow the metadata to elect for setscene tasks to run anyway
1207 covered_remove = set() 1207 covered_remove = set()
1208 if self.rq.setsceneverify: 1208 if self.rq.setsceneverify:
1209 call = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d)" 1209 invalidtasks = []
1210 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 } 1210 for task in xrange(len(self.rqdata.runq_task)):
1211 covered_remove = bb.utils.better_eval(call, locs) 1211 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
1212 taskname = self.rqdata.runq_task[task]
1213 taskdep = self.rqdata.dataCache.task_deps[fn]
1214
1215 if 'noexec' in taskdep and taskname in taskdep['noexec']:
1216 continue
1217 if self.rq.check_stamp_task(task, taskname + "_setscene", cache=self.stampcache):
1218 logger.debug(2, 'Setscene stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(task))
1219 continue
1220 if self.rq.check_stamp_task(task, taskname, recurse = True, cache=self.stampcache):
1221 logger.debug(2, 'Normal stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(task))
1222 continue
1223 invalidtasks.append(task)
1224
1225 call = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d, invalidtasks=invalidtasks)"
1226 call2 = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d)"
1227 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, "invalidtasks" : invalidtasks }
1228 # Backwards compatibility with older versions without invalidtasks
1229 try:
1230 covered_remove = bb.utils.better_eval(call, locs)
1231 except TypeError:
1232 covered_remove = bb.utils.better_eval(call2, locs)
1212 1233
1213 for task in covered_remove: 1234 for task in covered_remove:
1214 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] 1235 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]