sstate.bbclass: Ensure machine specific stamps are only wiped for the current task

sstate was being a little too ethusiastic about removing stamp files and
was removing stamp files for other machines when it shouldn't have been.

This patch teaches sstate about machine specific stamp extensions and
allows it to only remove the current task's stampfiles.

Based on a patch from Phil Blundell <philb@gnu.org> with some tweaks
from me.

(From OE-Core rev: 5e9488495401399d39fcb5012b86c313b6caca73)

(From OE-Core rev: e8efeedbc2ec1587b1c4d938c25cacd4e8611053)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-10-06 23:11:18 +01:00
parent ef1a8f21e0
commit dec4fb1bee
1 changed files with 7 additions and 2 deletions

View File

@ -258,10 +258,15 @@ def sstate_clean(ss, d):
bb.utils.unlockfile(lock)
stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info')
oe.path.remove(stfile)
oe.path.remove(stfile + "_setscene")
oe.path.remove(stfile + ".*")
oe.path.remove(stfile + "_setscene" + ".*")
if extrainf:
oe.path.remove(stfile + ".*" + extrainf)
oe.path.remove(stfile + "_setscene" + ".*" + extrainf)
else:
oe.path.remove(stfile + ".*")
oe.path.remove(stfile + "_setscene" + ".*")
CLEANFUNCS += "sstate_cleanall"