summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-06 09:34:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-06 11:22:44 +0100
commit58cbdaecf75b0248f96780b6882e8d4f232d038a (patch)
tree6c8808ec97f487eddb304a0daedbf86d8705bfc8 /bitbake
parent8aad4c243a542c8720cd23b6d1c4267916393df3 (diff)
downloadpoky-58cbdaecf75b0248f96780b6882e8d4f232d038a.tar.gz
bitbake: runqueue: Handle deferred task rehashing in multiconfig builds
If the hash of a task changes and that hash is a deferred task (e.g. a multiconfig build), we need to ensure that the hash change propagates through to all the tasks else the build will run multiple copies of the task, sometimes with oddly differing results as the outhashes of native tasks built in differing locations can confuse things. (Bitbake rev: b67476d4758915db7a5d9f58bc903ae7501a1774) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2db571324f755edc4981deecbcfdf0aaa5a97627) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 78e576eb2c..6c41fe6d43 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2294,10 +2294,16 @@ class RunQueueExecute:
2294 self.updated_taskhash_queue.remove((tid, unihash)) 2294 self.updated_taskhash_queue.remove((tid, unihash))
2295 2295
2296 if unihash != self.rqdata.runtaskentries[tid].unihash: 2296 if unihash != self.rqdata.runtaskentries[tid].unihash:
2297 hashequiv_logger.verbose("Task %s unihash changed to %s" % (tid, unihash)) 2297 # Make sure we rehash any other tasks with the same task hash that we're deferred against.
2298 self.rqdata.runtaskentries[tid].unihash = unihash 2298 torehash = [tid]
2299 bb.parse.siggen.set_unihash(tid, unihash) 2299 for deftid in self.sq_deferred:
2300 toprocess.add(tid) 2300 if self.sq_deferred[deftid] == tid:
2301 torehash.append(deftid)
2302 for hashtid in torehash:
2303 hashequiv_logger.verbose("Task %s unihash changed to %s" % (hashtid, unihash))
2304 self.rqdata.runtaskentries[hashtid].unihash = unihash
2305 bb.parse.siggen.set_unihash(hashtid, unihash)
2306 toprocess.add(hashtid)
2301 2307
2302 # Work out all tasks which depend upon these 2308 # Work out all tasks which depend upon these
2303 total = set() 2309 total = set()