diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-05 11:21:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-10-11 21:57:28 +0100 |
commit | 77dd72754907db274cbd0ab2bef35cb539e32758 (patch) | |
tree | 35f929fecac30ece12d3eeb0794200d739065094 /bitbake | |
parent | 697d4abaf36c479c1b850a5b5a2a5333865c68f0 (diff) | |
download | poky-77dd72754907db274cbd0ab2bef35cb539e32758.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: 513bfd771d9095fcb6a8bf93806673dbf988a4de)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 27228c7f026acb8ae9e1211d0486ffb7338123a2)
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.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 111dc0ee72..a23f7a8918 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -2523,11 +2523,14 @@ class RunQueueExecute: | |||
2523 | 2523 | ||
2524 | if update_tasks: | 2524 | if update_tasks: |
2525 | self.sqdone = False | 2525 | self.sqdone = False |
2526 | for tid in [t[0] for t in update_tasks]: | 2526 | for mc in sorted(self.sqdata.multiconfigs): |
2527 | h = pending_hash_index(tid, self.rqdata) | 2527 | for tid in sorted([t[0] for t in update_tasks]): |
2528 | if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]: | 2528 | if mc_from_tid(tid) != mc: |
2529 | self.sq_deferred[tid] = self.sqdata.hashes[h] | 2529 | continue |
2530 | bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h])) | 2530 | h = pending_hash_index(tid, self.rqdata) |
2531 | if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]: | ||
2532 | self.sq_deferred[tid] = self.sqdata.hashes[h] | ||
2533 | bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h])) | ||
2531 | update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) | 2534 | update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) |
2532 | 2535 | ||
2533 | for (tid, harddepfail, origvalid) in update_tasks: | 2536 | for (tid, harddepfail, origvalid) in update_tasks: |