summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 10:43:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-22 10:12:33 +0000
commitbf604a8fa80f0610a9d240878994cb45cc58dd3a (patch)
tree31be2836a8379c9827d2e7680b08c27b7b04bedd /bitbake
parentf6899f9b9452b267b24969d82c890b66110ebee3 (diff)
downloadpoky-bf604a8fa80f0610a9d240878994cb45cc58dd3a.tar.gz
bitbake: runqueue: Ensure deferred tasks are sorted by multiconfig
We have to prefer one multiconfig over another when deferring tasks, else we'll have cross-linked build trees and nothing will be able to build. In the original population code, we sort like this but we don't after rehashing. Ensure we have the same sorting after rehashing toa void deadlocks. (Bitbake rev: 657940c7c2a9dea4963a5063e4bf900d6b454903) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 27228c7f026acb8ae9e1211d0486ffb7338123a2) Signed-off-by: Fabio Berton <fabio.berton@criticaltechworks.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f63a21914c..2a1299db39 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2503,11 +2503,14 @@ class RunQueueExecute:
2503 2503
2504 if update_tasks: 2504 if update_tasks:
2505 self.sqdone = False 2505 self.sqdone = False
2506 for tid in [t[0] for t in update_tasks]: 2506 for mc in sorted(self.sqdata.multiconfigs):
2507 h = pending_hash_index(tid, self.rqdata) 2507 for tid in sorted([t[0] for t in update_tasks]):
2508 if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]: 2508 if mc_from_tid(tid) != mc:
2509 self.sq_deferred[tid] = self.sqdata.hashes[h] 2509 continue
2510 bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h])) 2510 h = pending_hash_index(tid, self.rqdata)
2511 if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]:
2512 self.sq_deferred[tid] = self.sqdata.hashes[h]
2513 bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h]))
2511 update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) 2514 update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
2512 2515
2513 for (tid, harddepfail, origvalid) in update_tasks: 2516 for (tid, harddepfail, origvalid) in update_tasks: