diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-27 20:57:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-28 10:28:06 +0000 |
commit | c7ad2dada79f715e5a5d54b2711c2956217588e7 (patch) | |
tree | 86c465e153a4781fc705da627b2178d2727b3c24 | |
parent | 06c6db7929c75f576a395fb442abe447b833fc3b (diff) | |
download | poky-c7ad2dada79f715e5a5d54b2711c2956217588e7.tar.gz |
sstate: Ensure stale stamp files are removed as part of sstate_clean()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index c83bc27bf0..d7d30c0121 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -49,8 +49,9 @@ python () { | |||
49 | d.setVar('SSTATETASKNAMES', " ".join(namemap)) | 49 | d.setVar('SSTATETASKNAMES', " ".join(namemap)) |
50 | } | 50 | } |
51 | 51 | ||
52 | def sstate_init(name, d): | 52 | def sstate_init(name, task, d): |
53 | ss = {} | 53 | ss = {} |
54 | ss['task'] = task | ||
54 | ss['name'] = name | 55 | ss['name'] = name |
55 | ss['dirs'] = [] | 56 | ss['dirs'] = [] |
56 | ss['plaindirs'] = [] | 57 | ss['plaindirs'] = [] |
@@ -73,7 +74,7 @@ def sstate_state_fromvars(d, task = None): | |||
73 | if not name or len(inputs) != len(outputs): | 74 | if not name or len(inputs) != len(outputs): |
74 | bb.fatal("sstate variables not setup correctly?!") | 75 | bb.fatal("sstate variables not setup correctly?!") |
75 | 76 | ||
76 | ss = sstate_init(name, d) | 77 | ss = sstate_init(name, task, d) |
77 | for i in range(len(inputs)): | 78 | for i in range(len(inputs)): |
78 | sstate_add(ss, inputs[i], outputs[i], d) | 79 | sstate_add(ss, inputs[i], outputs[i], d) |
79 | ss['lockfiles'] = lockfiles | 80 | ss['lockfiles'] = lockfiles |
@@ -219,6 +220,7 @@ def sstate_clean_manifest(manifest, d): | |||
219 | oe.path.remove(manifest) | 220 | oe.path.remove(manifest) |
220 | 221 | ||
221 | def sstate_clean(ss, d): | 222 | def sstate_clean(ss, d): |
223 | import oe.path | ||
222 | 224 | ||
223 | manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) | 225 | manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) |
224 | 226 | ||
@@ -234,6 +236,8 @@ def sstate_clean(ss, d): | |||
234 | for lock in locks: | 236 | for lock in locks: |
235 | bb.utils.unlockfile(lock) | 237 | bb.utils.unlockfile(lock) |
236 | 238 | ||
239 | oe.path.remove(d.getVar("STAMP", True) + ".do_" + ss['task'] + "*") | ||
240 | |||
237 | SCENEFUNCS += "sstate_cleanall" | 241 | SCENEFUNCS += "sstate_cleanall" |
238 | CLEANFUNCS += "sstate_cleanall" | 242 | CLEANFUNCS += "sstate_cleanall" |
239 | 243 | ||