summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-03-25 13:22:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-29 14:01:56 +0100
commitb4268c08c350a7928a0b1a041b04ffe5a44e77b4 (patch)
tree6ee7c5aaa7c40e47e7350c4e3fabf63485fb0f46 /bitbake/lib
parent68baef906513c1abef5372d92c769dc5d695e054 (diff)
downloadpoky-b4268c08c350a7928a0b1a041b04ffe5a44e77b4.tar.gz
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] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 3db083b261..3773ec0e1e 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1188,6 +1188,25 @@ class RunQueueExecuteTasks(RunQueueExecute):
1188 self.rq.scenequeue_covered.add(task) 1188 self.rq.scenequeue_covered.add(task)
1189 found = True 1189 found = True
1190 1190
1191 # Detect when the real task needs to be run anyway by looking to see
1192 # if any of its dependencies within the same package are scheduled
1193 # to be run.
1194 covered_remove = set()
1195 for task in self.rq.scenequeue_covered:
1196 task_fnid = self.rqdata.runq_fnid[task]
1197 for dep in self.rqdata.runq_depends[task]:
1198 if self.rqdata.runq_fnid[dep] == task_fnid:
1199 if dep not in self.rq.scenequeue_covered:
1200 covered_remove.add(task)
1201 break
1202
1203 for task in covered_remove:
1204 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
1205 taskname = self.rqdata.runq_task[task] + '_setscene'
1206 bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
1207 logger.debug(1, 'Not skipping task %s because it will have to be run anyway', task)
1208 self.rq.scenequeue_covered.remove(task)
1209
1191 logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered) 1210 logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
1192 1211
1193 for task in self.rq.scenequeue_covered: 1212 for task in self.rq.scenequeue_covered: