]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
sstatesig/find_siginfo: unify a disjointed API
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 18 Dec 2023 08:43:59 +0000 (09:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Jan 2024 11:57:24 +0000 (11:57 +0000)
commit8721c52041e910bd4d8a9235b52f274f4f02c8a3
tree03b9bf9cc7492198f2605fcf4ef3aff2432bb286
parent107d0db3dc3678e6f0ae4035f4c0b86c6b421168
sstatesig/find_siginfo: unify a disjointed API

find_siginfo() returns two different data structures depending
on whether its third argument (list of hashes to find) is empty or
not:
- a dict of timestamps keyed by path
- a dict of paths keyed by hash

This is not a good API design; it's much better to return
a dict of dicts that include both timestamp and path, keyed by
hash. Then the API consumer can decide how they want to use these
fields, particularly for additional diagnostics or informational
output.

I also took the opportunity to add a binary field that
tells if the match came from sstate or local stamps dir, which
will help prioritize local stamps when looking up most
recent task signatures.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/buildhistory_analysis.py
meta/lib/oe/sstatesig.py
meta/lib/oeqa/selftest/cases/sstatetests.py