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 <[email protected]>
---
 bitbake/lib/bb/runqueue.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index ac5222514de..2d2b28b3c99 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1775,6 +1775,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)
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192378): 
https://lists.openembedded.org/g/openembedded-core/message/192378
Mute This Topic: https://lists.openembedded.org/mt/103169701/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to