aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-12-18 09:44:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-05 11:59:05 +0000
commitc8574b796dabb69699c70540dd95a44d8f7388ab (patch)
tree3ebb885879cb84cb64677cfa8f8f24a3035cc095
parent721556568413508213d22c29985e305a45a8d68a (diff)
downloadbitbake-c8574b796dabb69699c70540dd95a44d8f7388ab.tar.gz
bitbake/runqueue: prioritize local stamps over sstate signatures in printdiff
Even with the reworked printdiff code, sstate which is heavily used in parallel can throw races at the tests: if a new matching, but otherwise unrelated sstate signature appears between writing out local stamps and listing matching sstate files, then that signature will be deemed 'the latest' and the actual local stamp will be discarded. This change ensures the scenario does not happen. It also makes use of the reworked find_siginfo(), particularly the 'sstate' entry in returned results. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/runqueue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 110865132..5a45943e3 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1782,6 +1782,9 @@ class RunQueue:
if match is None:
bb.fatal("Can't find a task we're supposed to have written out? (hash: %s tid: %s)?" % (h, tid))
matches = {k : v for k, v in iter(matches.items()) if h not in k}
+ matches_local = {k : v for k, v in iter(matches.items()) if h not in k and not v['sstate']}
+ if matches_local:
+ matches = matches_local
if matches:
latestmatch = matches[sorted(matches.keys(), key=lambda h: matches[h]['time'])[-1]]['path']
prevh = __find_sha256__.search(latestmatch).group(0)