sstate.bbclass: Optimise to check if the manifest exists without taking locks

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-01-27 20:52:33 +00:00
parent a17dc8b66d
commit 8a6e8623b4
1 changed files with 3 additions and 3 deletions

View 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))