summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-23 13:51:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-25 17:58:11 +0000
commit2ca41234b5f7d8293b5b56e69b0daebe8369cdbc (patch)
tree4d7a91f2c4e3a8751612d8674f292dcd66645016
parent5ec9511400abc4e3a6c416727a32e326a7d3daae (diff)
downloadpoky-2ca41234b5f7d8293b5b56e69b0daebe8369cdbc.tar.gz
poky-2ca41234b5f7d8293b5b56e69b0daebe8369cdbc.tar.bz2
poky-2ca41234b5f7d8293b5b56e69b0daebe8369cdbc.zip
bitbake: runqueue: Ensure failed harddependencies in scenequeue are accounted for in migrations
Setscene hard dependencies were not being correctly handled during task migration. For example, do_package of recipe X might become valid due to hashequiv yet we're still rebuilding pseudo-native, a harddep of do_package. This would mean it would try to execute that setscene task despite pseudo not being present. Fix this by ignoring tasks with failed harddependencies. This does mean stlightly more rebuilds than is optimal but it avoids build crashes. Ultimately the new runqueue model can likely better handle these cases than the older codebase could but that is for another more invasive patch. (Bitbake rev: 0dc61e8b9964f7fe41d51b6a481ca7aeaacd8bce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 26492e7087..485d9341f5 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2343,7 +2343,12 @@ class RunQueueExecute:
self.sq_buildable.remove(tid)
if tid in self.sq_running:
self.sq_running.remove(tid)
- if self.sqdata.sq_revdeps[tid].issubset(self.scenequeue_covered | self.scenequeue_notcovered):
+ harddepfail = False
+ for t in self.sqdata.sq_harddeps:
+ if tid in self.sqdata.sq_harddeps[t] and t in self.scenequeue_notcovered:
+ harddepfail = True
+ break
+ if not harddepfail and self.sqdata.sq_revdeps[tid].issubset(self.scenequeue_covered | self.scenequeue_notcovered):
if tid not in self.sq_buildable:
self.sq_buildable.add(tid)
if len(self.sqdata.sq_revdeps[tid]) == 0:
@@ -2374,6 +2379,8 @@ class RunQueueExecute:
update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
if tid in self.sqdata.valid and not origvalid:
logger.info("Setscene task %s became valid" % tid)
+ if harddepfail:
+ self.sq_task_failoutright(tid)
if changed:
self.holdoff_need_update = True