summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-12-18 09:44:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-05 11:59:08 +0000
commitcc85c8eb9d96e91a7767e92c86f0d7f2960b093b (patch)
tree17164f1069922decfbc39ea7610b0da45763f91a /bitbake/lib/bb/runqueue.py
parenta41b54ccbd90a55ee15f0952ec10df6db5b64db4 (diff)
downloadpoky-cc85c8eb9d96e91a7767e92c86f0d7f2960b093b.tar.gz
bitbake: 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. (Bitbake rev: 5439aca056c84ab4410aaf24bdb68e896191d8e1) 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.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index e14b5d41e1..d61dfbb691 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1759,7 +1759,7 @@ class RunQueue:
1759 1759
1760 recout = [] 1760 recout = []
1761 if len(hashfiles) == 2: 1761 if len(hashfiles) == 2:
1762 out2 = bb.siggen.compare_sigfiles(hashfiles[hash1], hashfiles[hash2], recursecb) 1762 out2 = bb.siggen.compare_sigfiles(hashfiles[hash1]['path'], hashfiles[hash2]['path'], recursecb)
1763 recout.extend(list(' ' + l for l in out2)) 1763 recout.extend(list(' ' + l for l in out2))
1764 else: 1764 else:
1765 recout.append("Unable to find matching sigdata for %s with hashes %s or %s" % (key, hash1, hash2)) 1765 recout.append("Unable to find matching sigdata for %s with hashes %s or %s" % (key, hash1, hash2))
@@ -1775,14 +1775,14 @@ class RunQueue:
1775 matches = bb.siggen.find_siginfo(pn, taskname, [], self.cooker.databuilder.mcdata[mc]) 1775 matches = bb.siggen.find_siginfo(pn, taskname, [], self.cooker.databuilder.mcdata[mc])
1776 bb.debug(1, "Found hashfiles:\n{}".format(matches)) 1776 bb.debug(1, "Found hashfiles:\n{}".format(matches))
1777 match = None 1777 match = None
1778 for m in matches: 1778 for m in matches.values():
1779 if h in m: 1779 if h in m['path']:
1780 match = m 1780 match = m['path']
1781 if match is None: 1781 if match is None:
1782 bb.fatal("Can't find a task we're supposed to have written out? (hash: %s tid: %s)?" % (h, tid)) 1782 bb.fatal("Can't find a task we're supposed to have written out? (hash: %s tid: %s)?" % (h, tid))
1783 matches = {k : v for k, v in iter(matches.items()) if h not in k} 1783 matches = {k : v for k, v in iter(matches.items()) if h not in k}
1784 if matches: 1784 if matches:
1785 latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1] 1785 latestmatch = matches[sorted(matches.keys(), key=lambda h: matches[h]['time'])[-1]]['path']
1786 prevh = __find_sha256__.search(latestmatch).group(0) 1786 prevh = __find_sha256__.search(latestmatch).group(0)
1787 output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb) 1787 output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb)
1788 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)) 1788 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))