runqueue.py: clarify that 'closest' signature means 'most recent' (and not closest in its content)
PATCH 1/1 runqueue.py: clarify that 'closest' signature means 'most recent' (and not closest in its content)
This is printed by 'bitbake -S printdiff' and more accurately reflects what the code does.
Most of the time the most recent item should be what the user wants to see when debugging sstate misses, but there could also be printdiff-all (print differences with all matching sstate objects), or printdiff-N (N most recent, and not just the latest).
--- bitbake/lib/bb/runqueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/runqueue.py +1 -1
@@ -1769,7 +1769,7 @@ class RunQueue: latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1] 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, closest matching task was %s\n " % (pn, taskname, h, prevh) + '\n '.join(output)) + 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)) class RunQueueExecute:
Signature · 1 line
2.39.2
Quoted 17 lines · Alexander Kanavin
This is printed by 'bitbake -S printdiff' and more accurately reflects what the code does.
Most of the time the most recent item should be what the user wants to see when debugging sstate misses, but there could also be printdiff-all (print differences with all matching sstate objects), or printdiff-N (N most recent, and not just the latest).
Signed-off-by Alexander Kanavin <[email protected]>--- bitbake/lib/bb/runqueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bitbake/lib/bb/runqueue.py +0
-0
bitbake/lib/bb/runqueue.py class RunQueue: · line 1774
Quoted 7 lines
bitbake/lib/bb/runqueue.py +1
-1@@ -1769,7 +1769,7 @@ class RunQueue: latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1] 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, closest matching task was %s\n " % (pn, taskname, h, prevh) + '\n '.join(output)) + 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))
One of the reasons I don't like this code is that matching "policy" comes from 'distant' files and runqueue really doesn't know much about this.
The patch is probably ok but long term we need to handle this better and in a way which means if we can improve the matching, the message and code are more spatially related.
Cheers,
Richard