diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index b6e6c92003..adadbcffc7 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -30,13 +30,16 @@ python () { | |||
30 | scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}" | 30 | scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}" |
31 | bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d) | 31 | bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d) |
32 | 32 | ||
33 | namemap = [] | ||
33 | for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split(): | 34 | for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split(): |
35 | namemap.append(bb.data.getVarFlag(task, 'sstate-name', d)) | ||
34 | funcs = bb.data.getVarFlag(task, 'prefuncs', d) or "" | 36 | funcs = bb.data.getVarFlag(task, 'prefuncs', d) or "" |
35 | funcs = "sstate_task_prefunc " + funcs | 37 | funcs = "sstate_task_prefunc " + funcs |
36 | bb.data.setVarFlag(task, 'prefuncs', funcs, d) | 38 | bb.data.setVarFlag(task, 'prefuncs', funcs, d) |
37 | funcs = bb.data.getVarFlag(task, 'postfuncs', d) or "" | 39 | funcs = bb.data.getVarFlag(task, 'postfuncs', d) or "" |
38 | funcs = funcs + " sstate_task_postfunc" | 40 | funcs = funcs + " sstate_task_postfunc" |
39 | bb.data.setVarFlag(task, 'postfuncs', funcs, d) | 41 | bb.data.setVarFlag(task, 'postfuncs', funcs, d) |
42 | d.setVar('SSTATETASKNAMES', " ".join(namemap)) | ||
40 | } | 43 | } |
41 | 44 | ||
42 | def sstate_init(name, d): | 45 | def sstate_init(name, d): |
@@ -261,7 +264,12 @@ python sstate_cleanall() { | |||
261 | 264 | ||
262 | for manifest in (os.listdir(manifest_dir)): | 265 | for manifest in (os.listdir(manifest_dir)): |
263 | if fnmatch.fnmatch(manifest, manifest_pattern): | 266 | if fnmatch.fnmatch(manifest, manifest_pattern): |
264 | sstate_clean_manifest(manifest_dir + "/" + manifest, d) | 267 | name = manifest.replace(manifest_pattern[:-1], "") |
268 | namemap = d.getVar('SSTATETASKNAMES', True).split() | ||
269 | tasks = d.getVar('SSTATETASKS', True).split() | ||
270 | taskname = tasks[namemap.index(name)] | ||
271 | shared_state = sstate_state_fromvars(d, taskname[3:]) | ||
272 | sstate_clean(shared_state, d) | ||
265 | } | 273 | } |
266 | 274 | ||
267 | def sstate_package(ss, d): | 275 | def sstate_package(ss, d): |