summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 14:50:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 15:23:13 +0100
commit14c31e18e4a4a52ee54056aeefb09ff8c295b475 (patch)
tree2d7278983b7650b3c7152ea56eb338637b45ef07 /lib
parent0036b36e333a68c6d30a6bf5c21bfd4fd3e8441b (diff)
downloadbitbake-contrib-14c31e18e4a4a52ee54056aeefb09ff8c295b475.tar.gz
cache: Don't reload the cache file since we already have this data in memory
If we're writing out merged data to disk, its safe to assume that either we loaded the data or couldn't. Loading it again is relatively pointless and time consuming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/cache.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 936829b83..6dedd4d59 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -814,15 +814,7 @@ class MultiProcessCache(object):
glf = bb.utils.lockfile(self.cachefile + ".lock")
- try:
- with open(self.cachefile, "rb") as f:
- p = pickle.Unpickler(f)
- data, version = p.load()
- except (IOError, EOFError):
- data, version = None, None
-
- if version != self.__class__.CACHE_VERSION:
- data = self.create_cachedata()
+ data = self.cachedata
for f in [y for y in os.listdir(os.path.dirname(self.cachefile)) if y.startswith(os.path.basename(self.cachefile) + '-')]:
f = os.path.join(os.path.dirname(self.cachefile), f)