summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-19 11:48:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-19 11:48:55 +0000
commit542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38 (patch)
tree22dbcee353e75a7d2c1492f2118569b5f4071dbd /meta
parentede381d56b180b384fdad98d445e5430819cfade (diff)
downloadpoky-542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38.tar.gz
sstate.bbclass: Ensure clean/setscene sstate functions run under appropriate locking
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass10
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
42def sstate_init(name, d): 45def 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
267def sstate_package(ss, d): 275def sstate_package(ss, d):