[poky] [PATCH 2/3] sstate.bbclass: always delete stamp files in sstate_clean

Paul Eggleton paul.eggleton at linux.intel.com
Mon Feb 28 06:38:03 PST 2011


From: Paul Eggleton <paul.eggleton at linux.intel.com>

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 at linux.intel.com>
---
 meta/classes/sstate.bbclass |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 722e3c4..b91c0b0 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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)
-- 
1.7.1




More information about the poky mailing list