summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-27 20:57:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-28 10:28:06 +0000
commitc7ad2dada79f715e5a5d54b2711c2956217588e7 (patch)
tree86c465e153a4781fc705da627b2178d2727b3c24
parent06c6db7929c75f576a395fb442abe447b833fc3b (diff)
downloadpoky-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.bbclass8
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
52def sstate_init(name, d): 52def 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
221def sstate_clean(ss, d): 222def 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
237SCENEFUNCS += "sstate_cleanall" 241SCENEFUNCS += "sstate_cleanall"
238CLEANFUNCS += "sstate_cleanall" 242CLEANFUNCS += "sstate_cleanall"
239 243