From 0984853cedca11a748076b788c4fc9c561ecb291 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jul 2012 18:58:06 +0000 Subject: 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 --- bitbake/lib/bb/runqueue.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'bitbake') 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): # Allow the metadata to elect for setscene tasks to run anyway covered_remove = set() 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) + invalidtasks = [] + for task in xrange(len(self.rqdata.runq_task)): + fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] + taskname = self.rqdata.runq_task[task] + taskdep = self.rqdata.dataCache.task_deps[fn] + + if 'noexec' in taskdep and taskname in taskdep['noexec']: + continue + if self.rq.check_stamp_task(task, taskname + "_setscene", cache=self.stampcache): + logger.debug(2, 'Setscene stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(task)) + continue + if self.rq.check_stamp_task(task, taskname, recurse = True, cache=self.stampcache): + logger.debug(2, 'Normal stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(task)) + continue + invalidtasks.append(task) + + call = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d, invalidtasks=invalidtasks)" + call2 = 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, "invalidtasks" : invalidtasks } + # Backwards compatibility with older versions without invalidtasks + try: + covered_remove = bb.utils.better_eval(call, locs) + except TypeError: + covered_remove = bb.utils.better_eval(call2, locs) for task in covered_remove: fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] -- cgit v1.2.3-54-g00ecf