mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
@@ -823,9 +823,11 @@ class MultiProcessCache(object):
|
|||||||
p = pickle.Unpickler(fd)
|
p = pickle.Unpickler(fd)
|
||||||
extradata, version = p.load()
|
extradata, version = p.load()
|
||||||
except (IOError, EOFError):
|
except (IOError, EOFError):
|
||||||
extradata, version = self.create_cachedata(), None
|
os.unlink(f)
|
||||||
|
continue
|
||||||
|
|
||||||
if version != self.__class__.CACHE_VERSION:
|
if version != self.__class__.CACHE_VERSION:
|
||||||
|
os.unlink(f)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.merge_data(extradata, data)
|
self.merge_data(extradata, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user