diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2021-11-09 11:11:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-16 22:20:33 +0000 |
commit | 91fab7aa7e90bf666bba4018304a2ce0e42cc466 (patch) | |
tree | 9ae4a3165f3df5f29e70259f55784f3e6b61d205 | |
parent | e7acdb37af9c1b5e9d7bc0f6fd549c3c14a19d53 (diff) | |
download | poky-91fab7aa7e90bf666bba4018304a2ce0e42cc466.tar.gz |
sstate: add a function to get the sstate file name in sstate_checkhashes
(From OE-Core rev: dc64479264bdf3d60ece02a98b65be35650f8f86)
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 88bd84a06c..0a78a2fb69 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -934,12 +934,13 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
934 | 934 | ||
935 | return spec, extrapath, tname | 935 | return spec, extrapath, tname |
936 | 936 | ||
937 | def getsstatefile(tid, siginfo, d): | ||
938 | spec, extrapath, tname = getpathcomponents(tid, d) | ||
939 | return extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d) | ||
937 | 940 | ||
938 | for tid in sq_data['hash']: | 941 | for tid in sq_data['hash']: |
939 | 942 | ||
940 | spec, extrapath, tname = getpathcomponents(tid, d) | 943 | sstatefile = d.expand("${SSTATE_DIR}/" + getsstatefile(tid, siginfo, d)) |
941 | |||
942 | sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) | ||
943 | 944 | ||
944 | if os.path.exists(sstatefile): | 945 | if os.path.exists(sstatefile): |
945 | found.add(tid) | 946 | found.add(tid) |
@@ -1000,8 +1001,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
1000 | 1001 | ||
1001 | tasklist = [] | 1002 | tasklist = [] |
1002 | for tid in missed: | 1003 | for tid in missed: |
1003 | spec, extrapath, tname = getpathcomponents(tid, d) | 1004 | sstatefile = d.expand(getsstatefile(tid, siginfo, d)) |
1004 | sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) | ||
1005 | tasklist.append((tid, sstatefile)) | 1005 | tasklist.append((tid, sstatefile)) |
1006 | 1006 | ||
1007 | if tasklist: | 1007 | if tasklist: |
@@ -1028,12 +1028,10 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
1028 | if "toaster" in inheritlist: | 1028 | if "toaster" in inheritlist: |
1029 | evdata = {'missed': [], 'found': []}; | 1029 | evdata = {'missed': [], 'found': []}; |
1030 | for tid in missed: | 1030 | for tid in missed: |
1031 | spec, extrapath, tname = getpathcomponents(tid, d) | 1031 | sstatefile = d.expand(getsstatefile(tid, False, d)) |
1032 | sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), tname, False, d)) | ||
1033 | evdata['missed'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) ) | 1032 | evdata['missed'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) ) |
1034 | for tid in found: | 1033 | for tid in found: |
1035 | spec, extrapath, tname = getpathcomponents(tid, d) | 1034 | sstatefile = d.expand(getsstatefile(tid, False, d)) |
1036 | sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), tname, False, d)) | ||
1037 | evdata['found'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) ) | 1035 | evdata['found'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) ) |
1038 | bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d) | 1036 | bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d) |
1039 | 1037 | ||