]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Ensure machine specific stamps are only wiped for the current task
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Oct 2011 22:11:18 +0000 (23:11 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Oct 2011 21:43:08 +0000 (22:43 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index eee04ab3f5eddd28a073987c420e5a9e6c89f863..6abf55bb140a40e06f8435c2ca31ecd1f8efbdec 100644 (file)
@@ -259,10 +259,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"