mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
bitbake: runqueue: Clean up BB_HASHCHECK_FUNCTION API
This function uses an old API which uses offsets into lists as a communication mechanism. Update the API to use "tid" which is used universally in runqueue now. We can also add kwargs support to the funciton definition to drop some of the backwards compaiblility hoops we had to jump though with different function argument combinations. (Bitbake rev: dc23550047e5078da491ce9a6f30989cb5260df6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -216,27 +216,25 @@ def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
|
||||
|
||||
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
|
||||
|
||||
def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False, *, sq_unihash=None):
|
||||
def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, **kwargs):
|
||||
|
||||
ret = []
|
||||
missed = []
|
||||
found = set()
|
||||
missed = set()
|
||||
|
||||
valid = d.getVar("SSTATEVALID").split()
|
||||
|
||||
for task in range(len(sq_fn)):
|
||||
n = os.path.basename(sq_fn[task]).rsplit(".", 1)[0] + ":" + sq_task[task]
|
||||
for tid in sq_data['hash']:
|
||||
n = os.path.basename(bb.runqueue.fn_from_tid(tid)).split(".")[0] + ":do_" + bb.runqueue.taskname_from_tid(tid)[3:]
|
||||
print(n)
|
||||
if n in valid:
|
||||
bb.note("SState: Found valid sstate for %s" % n)
|
||||
ret.append(task)
|
||||
found.add(tid)
|
||||
elif os.path.exists(d.expand("${TOPDIR}/%s.run" % n.replace("do_", ""))):
|
||||
bb.note("SState: Found valid sstate for %s (already run)" % n)
|
||||
ret.append(task)
|
||||
found.add(tid)
|
||||
else:
|
||||
missed.append(task)
|
||||
missed.add(tid)
|
||||
bb.note("SState: Found no valid sstate for %s" % n)
|
||||
|
||||
if hasattr(bb.parse.siggen, "checkhashes"):
|
||||
bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)
|
||||
|
||||
return ret
|
||||
return found
|
||||
|
||||
|
||||
Reference in New Issue
Block a user