diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-19 11:48:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-19 11:48:55 +0000 |
commit | 542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38 (patch) | |
tree | 22dbcee353e75a7d2c1492f2118569b5f4071dbd /meta/classes/sstate.bbclass | |
parent | ede381d56b180b384fdad98d445e5430819cfade (diff) | |
download | openembedded-core-542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38.tar.gz openembedded-core-542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38.tar.bz2 openembedded-core-542cebbc3282a0b3acb68a5ef0d8c2a61b0ecc38.zip |
sstate.bbclass: Ensure clean/setscene sstate functions run under appropriate locking
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-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 () { scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}" bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d) + namemap = [] for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split(): + namemap.append(bb.data.getVarFlag(task, 'sstate-name', d)) funcs = bb.data.getVarFlag(task, 'prefuncs', d) or "" funcs = "sstate_task_prefunc " + funcs bb.data.setVarFlag(task, 'prefuncs', funcs, d) funcs = bb.data.getVarFlag(task, 'postfuncs', d) or "" funcs = funcs + " sstate_task_postfunc" bb.data.setVarFlag(task, 'postfuncs', funcs, d) + d.setVar('SSTATETASKNAMES', " ".join(namemap)) } def sstate_init(name, d): @@ -261,7 +264,12 @@ python sstate_cleanall() { for manifest in (os.listdir(manifest_dir)): if fnmatch.fnmatch(manifest, manifest_pattern): - sstate_clean_manifest(manifest_dir + "/" + manifest, d) + name = manifest.replace(manifest_pattern[:-1], "") + namemap = d.getVar('SSTATETASKNAMES', True).split() + tasks = d.getVar('SSTATETASKS', True).split() + taskname = tasks[namemap.index(name)] + shared_state = sstate_state_fromvars(d, taskname[3:]) + sstate_clean(shared_state, d) } def sstate_package(ss, d): |