diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-12-18 09:44:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-05 11:59:08 +0000 |
commit | 7d400f94fee616aea84af63493bb2fb2d899a4ff (patch) | |
tree | b18c8307c17859c4f889f98edd4c206666411145 /bitbake/lib/bb/runqueue.py | |
parent | 859786a83f8bb826d3cd89c08bd9596fc7cf2474 (diff) | |
download | poky-7d400f94fee616aea84af63493bb2fb2d899a4ff.tar.gz |
bitbake: 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.
(Bitbake rev: c8574b796dabb69699c70540dd95a44d8f7388ab)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 110865132d..5a45943e3a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1782,6 +1782,9 @@ class RunQueue: | |||
1782 | if match is None: | 1782 | if match is None: |
1783 | bb.fatal("Can't find a task we're supposed to have written out? (hash: %s tid: %s)?" % (h, tid)) | 1783 | bb.fatal("Can't find a task we're supposed to have written out? (hash: %s tid: %s)?" % (h, tid)) |
1784 | matches = {k : v for k, v in iter(matches.items()) if h not in k} | 1784 | matches = {k : v for k, v in iter(matches.items()) if h not in k} |
1785 | matches_local = {k : v for k, v in iter(matches.items()) if h not in k and not v['sstate']} | ||
1786 | if matches_local: | ||
1787 | matches = matches_local | ||
1785 | if matches: | 1788 | if matches: |
1786 | latestmatch = matches[sorted(matches.keys(), key=lambda h: matches[h]['time'])[-1]]['path'] | 1789 | latestmatch = matches[sorted(matches.keys(), key=lambda h: matches[h]['time'])[-1]]['path'] |
1787 | prevh = __find_sha256__.search(latestmatch).group(0) | 1790 | prevh = __find_sha256__.search(latestmatch).group(0) |