diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-27 20:52:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-27 20:52:33 +0000 |
commit | 8a6e8623b43a5b38546e0a8c96f473dba9b31eee (patch) | |
tree | 6db4ca1565f1da09a1712b9a6825436e53a1cc4b /meta/classes/sstate.bbclass | |
parent | a17dc8b66d40c937beb363872b3a6af31232f7ff (diff) | |
download | openembedded-core-8a6e8623b43a5b38546e0a8c96f473dba9b31eee.tar.gz openembedded-core-8a6e8623b43a5b38546e0a8c96f473dba9b31eee.tar.bz2 openembedded-core-8a6e8623b43a5b38546e0a8c96f473dba9b31eee.tar.xz openembedded-core-8a6e8623b43a5b38546e0a8c96f473dba9b31eee.zip |
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/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 3bfb554aa..96b06adcf 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -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)) |