diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-20 10:46:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-20 13:48:01 +0000 |
commit | bf7d1352012c8737ae7aad3bc992c2b9c85e3205 (patch) | |
tree | f9f391e797b2cd5f6223f265419c7b1e8ecbfd53 | |
parent | 215dab864e7cf74394840621ad0754db593708f1 (diff) | |
download | poky-bf7d1352012c8737ae7aad3bc992c2b9c85e3205.tar.gz |
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 rev: f21910157d873c030b149c4cdc5b57c5062ab5a6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 21 |
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) |