]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: always delete stamp files in sstate_clean
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 28 Feb 2011 13:29:15 +0000 (13:29 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Mar 2011 13:18:06 +0000 (13:18 +0000)
For safety, always delete the stamp files in sstate_clean regardless of
whether the manifest file exists or not.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/sstate.bbclass

index d367faaa7b135b237c8fefcdc058d7d163d8d49f..b4873f0f3d841016139df689dd8c208a1eb33135 100644 (file)
@@ -229,17 +229,15 @@ def sstate_clean(ss, d):
 
     manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d)
 
-    if not os.path.exists(manifest):
-       return
+    if os.path.exists(manifest):
+        locks = []
+        for lock in ss['lockfiles']:
+            locks.append(bb.utils.lockfile(lock))
 
-    locks = []
-    for lock in ss['lockfiles']:
-        locks.append(bb.utils.lockfile(lock))
+        sstate_clean_manifest(manifest, d)
 
-    sstate_clean_manifest(manifest, d)
-
-    for lock in locks:
-        bb.utils.unlockfile(lock)
+        for lock in locks:
+            bb.utils.unlockfile(lock)
 
     stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
     oe.path.remove(stfile)