summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-10 10:09:39 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-11 14:16:04 +0000
commit64fc47ba1240a6c620f3d10cb9051465b9f179ed (patch)
tree7dff865e44af5697e8502369e503cce8cda7f72d /bitbake
parent43c1b32b2cdb5f7e8a93cf4c6b4248305c7bf106 (diff)
downloadpoky-64fc47ba1240a6c620f3d10cb9051465b9f179ed.tar.gz
bitbake: bitbake: runqueue: Fix hole in setsceneverify skipped task logic
We have do_bundle_initramfs which is a task inserted after compile and before build. It is not covered by sstate. If we run a build with a valid sstate cache present, the setsceneverify function realises it will rerun the do_compile step (due to the bundle_initramfs task) and hence marks do_populate_sysroot to rerun. do_install, a dependency of do_populate_sysroot is left as marked as covered by sstate. What we need to do is traverse the dependency tree for any setsceneverify invalided task and ensure any dependencies are also invalidated. We can stop at any point we reach another setscene task though. This means the do_populate_sysroot task has the data from do_install available and doesn't crash. (Bitbake master rev: f21910157d873c030b149c4cdc5b57c5062ab5a6) (Bitbake rev: 1484905373ad717cedcaef37a0addde034ebdc60) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index c09cfd4b2c..72c020801b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1204,6 +1204,8 @@ class RunQueueExecuteTasks(RunQueueExecute):
1204 1204
1205 self.stampcache = {} 1205 self.stampcache = {}
1206 1206
1207 initial_covered = self.rq.scenequeue_covered.copy()
1208
1207 # Mark initial buildable tasks 1209 # Mark initial buildable tasks
1208 for task in xrange(self.stats.total): 1210 for task in xrange(self.stats.total):
1209 self.runq_running.append(0) 1211 self.runq_running.append(0)
@@ -1257,13 +1259,28 @@ class RunQueueExecuteTasks(RunQueueExecute):
1257 except TypeError: 1259 except TypeError:
1258 covered_remove = bb.utils.better_eval(call2, locs) 1260 covered_remove = bb.utils.better_eval(call2, locs)
1259 1261
1260 for task in covered_remove: 1262 def removecoveredtask(task):
1261 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] 1263 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
1262 taskname = self.rqdata.runq_task[task] + '_setscene' 1264 taskname = self.rqdata.runq_task[task] + '_setscene'
1263 bb.build.del_stamp(taskname, self.rqdata.dataCache, fn) 1265 bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
1264 logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
1265 self.rq.scenequeue_covered.remove(task) 1266 self.rq.scenequeue_covered.remove(task)
1266 1267
1268 toremove = covered_remove
1269 for task in toremove:
1270 logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
1271 while toremove:
1272 covered_remove = []
1273 for task in toremove:
1274 removecoveredtask(task)
1275 for deptask in self.rqdata.runq_depends[task]:
1276 if deptask not in self.rq.scenequeue_covered:
1277 continue
1278 if deptask in toremove or deptask in covered_remove or deptask in initial_covered:
1279 continue
1280 logger.debug(1, 'Task %s depends on task %s so not skipping' % (task, deptask))
1281 covered_remove.append(deptask)
1282 toremove = covered_remove
1283
1267 logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered) 1284 logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
1268 1285
1269 event.fire(bb.event.StampUpdate(self.rqdata.target_pairs, self.rqdata.dataCache.stamp), self.cfgData) 1286 event.fire(bb.event.StampUpdate(self.rqdata.target_pairs, self.rqdata.dataCache.stamp), self.cfgData)