diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 12:33:58 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 12:33:58 +0100 |
commit | 4b2a355a3134cff36b220c16b3b8816b202e03ce (patch) | |
tree | ce33296fc19b5077541c243bf8cc717f0b72a779 /meta/classes/sstate.bbclass | |
parent | 5c7531f78cd77d1d4de19563fb61cdaf8dd7f3f8 (diff) | |
download | openembedded-core-4b2a355a3134cff36b220c16b3b8816b202e03ce.tar.gz openembedded-core-4b2a355a3134cff36b220c16b3b8816b202e03ce.tar.bz2 openembedded-core-4b2a355a3134cff36b220c16b3b8816b202e03ce.zip |
sstate/utility-tasks: Ensure do_clean functions correctly and removes shared state
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 0aa8505f49..08c22293cc 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -188,23 +188,24 @@ def sstate_clean(ss, d): bb.utils.unlockfile(lock) SCENEFUNCS += "sstate_cleanall" +CLEANFUNCS += "sstate_cleanall" python sstate_cleanall() { import fnmatch - bb.note("Removing %s from staging" % bb.data.getVar('PN', d, True)) + bb.note("Removing shared state for package %s" % bb.data.getVar('PN', d, True)) manifest_dir = bb.data.getVar('PSTAGE2_MANIFESTS', d, True) manifest_pattern = bb.data.expand("manifest-${PN}.*", d) + if not os.path.exists(manifest_dir): + return + for manifest in (os.listdir(manifest_dir)): if fnmatch.fnmatch(manifest, manifest_pattern): sstate_clean_manifest(manifest_dir + "/" + manifest, d) } -do_clean[postfuncs] += "sstate_cleanall" -do_clean[dirs] += "${PSTAGE2_MANIFESTS}" - def sstate_package(ss, d): import oe.path |