summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-27 20:52:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-27 20:52:33 +0000
commit8a6e8623b43a5b38546e0a8c96f473dba9b31eee (patch)
tree6db4ca1565f1da09a1712b9a6825436e53a1cc4b /meta/classes
parenta17dc8b66d40c937beb363872b3a6af31232f7ff (diff)
downloadpoky-8a6e8623b43a5b38546e0a8c96f473dba9b31eee.tar.gz
sstate.bbclass: Optimise to check if the manifest exists without taking locks
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 3bfb554aa5..96b06adcfe 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -196,9 +196,6 @@ def sstate_clean_cachefiles(d):
196def sstate_clean_manifest(manifest, d): 196def sstate_clean_manifest(manifest, d):
197 import oe.path 197 import oe.path
198 198
199 if not os.path.exists(manifest):
200 return
201
202 mfile = open(manifest) 199 mfile = open(manifest)
203 entries = mfile.readlines() 200 entries = mfile.readlines()
204 mfile.close() 201 mfile.close()
@@ -225,6 +222,9 @@ def sstate_clean(ss, d):
225 222
226 manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) 223 manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d)
227 224
225 if not os.path.exists(manifest):
226 return
227
228 locks = [] 228 locks = []
229 for lock in ss['lockfiles']: 229 for lock in ss['lockfiles']:
230 locks.append(bb.utils.lockfile(lock)) 230 locks.append(bb.utils.lockfile(lock))