diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-12-18 09:44:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-05 11:39:35 +0000 |
commit | 5439aca056c84ab4410aaf24bdb68e896191d8e1 (patch) | |
tree | cf99da6bbebf123755f919e15c0fc79e4ac002c6 /lib | |
parent | 28364c08f36c778a5cb2e3f20ceb052370ef153c (diff) | |
download | bitbake-5439aca056c84ab4410aaf24bdb68e896191d8e1.tar.gz |
bitbake-diffsigs/runqueue: adapt to reworked find_siginfo()
In particular having 'time' explicitly used as a sorting key should make it
more clear how the entries are being sorted.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/runqueue.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index e14b5d41e..d61dfbb69 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1759,7 +1759,7 @@ class RunQueue: recout = [] if len(hashfiles) == 2: - out2 = bb.siggen.compare_sigfiles(hashfiles[hash1], hashfiles[hash2], recursecb) + out2 = bb.siggen.compare_sigfiles(hashfiles[hash1]['path'], hashfiles[hash2]['path'], recursecb) recout.extend(list(' ' + l for l in out2)) else: recout.append("Unable to find matching sigdata for %s with hashes %s or %s" % (key, hash1, hash2)) @@ -1775,14 +1775,14 @@ class RunQueue: matches = bb.siggen.find_siginfo(pn, taskname, [], self.cooker.databuilder.mcdata[mc]) bb.debug(1, "Found hashfiles:\n{}".format(matches)) match = None - for m in matches: - if h in m: - match = m + for m in matches.values(): + if h in m['path']: + match = m['path'] 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} if matches: - latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1] + latestmatch = matches[sorted(matches.keys(), key=lambda h: matches[h]['time'])[-1]]['path'] prevh = __find_sha256__.search(latestmatch).group(0) output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb) bb.plain("\nTask %s:%s couldn't be used from the cache because:\n We need hash %s, most recent matching task was %s\n " % (pn, taskname, h, prevh) + '\n '.join(output)) |