aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 14:52:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-26 08:50:14 +0100
commita05435fc59d32f2fcf4ea4185cb0655eeb343211 (patch)
tree9ef93f398281590fb6a7f1b9dbe0cbdf33aa4160 /bitbake
parent97f4d8fa78ec25813bdbda72d4a7c0536c90daa2 (diff)
downloadopenembedded-core-contrib-a05435fc59d32f2fcf4ea4185cb0655eeb343211.tar.gz
bitbake: cache: Optimise invalid cache file handling
If there is a corrupt/invalid cache file, we'd keep trying to reopen it. This is pointless, simplify the code paths and delete the dead file. (Bitbake rev: c22441f7025be012ad2e62a51ccb993c3a0e16c9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 6dedd4d595..c7f3b7ab71 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -823,9 +823,11 @@ class MultiProcessCache(object):
p = pickle.Unpickler(fd)
extradata, version = p.load()
except (IOError, EOFError):
- extradata, version = self.create_cachedata(), None
+ os.unlink(f)
+ continue
if version != self.__class__.CACHE_VERSION:
+ os.unlink(f)
continue
self.merge_data(extradata, data)