diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-25 14:52:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-26 08:50:14 +0100 |
commit | a05435fc59d32f2fcf4ea4185cb0655eeb343211 (patch) | |
tree | 9ef93f398281590fb6a7f1b9dbe0cbdf33aa4160 /bitbake/lib | |
parent | 97f4d8fa78ec25813bdbda72d4a7c0536c90daa2 (diff) | |
download | poky-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/lib')
-rw-r--r-- | bitbake/lib/bb/cache.py | 4 |
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): | |||
823 | p = pickle.Unpickler(fd) | 823 | p = pickle.Unpickler(fd) |
824 | extradata, version = p.load() | 824 | extradata, version = p.load() |
825 | except (IOError, EOFError): | 825 | except (IOError, EOFError): |
826 | extradata, version = self.create_cachedata(), None | 826 | os.unlink(f) |
827 | continue | ||
827 | 828 | ||
828 | if version != self.__class__.CACHE_VERSION: | 829 | if version != self.__class__.CACHE_VERSION: |
830 | os.unlink(f) | ||
829 | continue | 831 | continue |
830 | 832 | ||
831 | self.merge_data(extradata, data) | 833 | self.merge_data(extradata, data) |