summaryrefslogtreecommitdiff
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-14 15:38:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-17 17:21:47 +0000
commit9817e2efdb94395655d711f5eadedcd249c8cffe (patch)
tree08cc32a80a2fdb4b2d56d80aeabbedb7ba16084d /meta/classes/sstate.bbclass
parent4741b90b170bc96e3a24f9c1dce871af060bc4d5 (diff)
downloadopenembedded-core-9817e2efdb94395655d711f5eadedcd249c8cffe.tar.gz
openembedded-core-9817e2efdb94395655d711f5eadedcd249c8cffe.tar.bz2
openembedded-core-9817e2efdb94395655d711f5eadedcd249c8cffe.zip
sstate.bbclass: Simplify overcomplicated cleanall function
The code was written before SSTATETASKNAMES existed. Since it does exist, lets simply the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass21
1 files changed, 6 insertions, 15 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index ec2c123b68..29f6b1c261 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -346,27 +346,18 @@ def sstate_clean(ss, d):
CLEANFUNCS += "sstate_cleanall"
python sstate_cleanall() {
- import fnmatch
-
bb.note("Removing shared state for package %s" % d.getVar('PN', True))
manifest_dir = d.getVar('SSTATE_MANIFESTS', True)
- manifest_prefix = d.getVar("SSTATE_MANFILEPREFIX", True)
- manifest_pattern = os.path.basename(manifest_prefix) + ".*"
-
if not os.path.exists(manifest_dir):
return
- for manifest in (os.listdir(manifest_dir)):
- if fnmatch.fnmatch(manifest, manifest_pattern):
- name = manifest.replace(manifest_pattern[:-1], "")
- namemap = d.getVar('SSTATETASKNAMES', True).split()
- tasks = d.getVar('SSTATETASKS', True).split()
- if name not in namemap:
- continue
- taskname = tasks[namemap.index(name)]
- shared_state = sstate_state_fromvars(d, taskname[3:])
- sstate_clean(shared_state, d)
+ namemap = d.getVar('SSTATETASKNAMES', True).split()
+ tasks = d.getVar('SSTATETASKS', True).split()
+ for name in namemap:
+ taskname = tasks[namemap.index(name)]
+ shared_state = sstate_state_fromvars(d, taskname[3:])
+ sstate_clean(shared_state, d)
}
def sstate_hardcode_path(d):