]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Optimise to check if the manifest exists without taking locks
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jan 2011 20:52:33 +0000 (20:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jan 2011 20:52:33 +0000 (20:52 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 3bfb554aa5da5612bdc016a3409fd487d4517a5f..96b06adcfe9ee908ec28cd5ec79a42a518385854 100644 (file)
@@ -196,9 +196,6 @@ def sstate_clean_cachefiles(d):
 def sstate_clean_manifest(manifest, d):
     import oe.path
 
-    if not os.path.exists(manifest):
-       return
-
     mfile = open(manifest)
     entries = mfile.readlines()
     mfile.close()
@@ -225,6 +222,9 @@ def sstate_clean(ss, d):
 
     manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d)
 
+    if not os.path.exists(manifest):
+       return
+
     locks = []
     for lock in ss['lockfiles']:
         locks.append(bb.utils.lockfile(lock))