From 32e190e5ccaaa75183dbc410f32b700d39874aca Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 25 Mar 2011 13:22:01 +0000 Subject: bitbake/runqueue: fix clash when setscene & real tasks done in same build If a build causes a real task to be run when the setscene task has already run then it was possible for dependent packages to be rebuilding at the same time as a rebuild of the packages they depended on, resulting in failures when files were missing. This change looks in the setscene covered list and removes anything where a dependency of the real task is going to be run (e.g. do_install is going to be run even though the setscene equivalent of do_populate_sysroot has already been run). As an additional safeguard we also delete the stamp file for the setscene task under these circumstances. Fixes [YOCTO #792] (From Poky rev: b4268c08c350a7928a0b1a041b04ffe5a44e77b4) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- lib/bb/runqueue.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib') diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index ddb90160e..fab17b150 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1165,6 +1165,25 @@ class RunQueueExecuteTasks(RunQueueExecute): self.rq.scenequeue_covered.add(task) found = True + # 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. + 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 + + 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) + self.rq.scenequeue_covered.remove(task) + logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered) for task in self.rq.scenequeue_covered: -- cgit 1.2.3-korg