]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: cache: Correctly handle missing extra caches
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jul 2016 16:27:35 +0000 (17:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Jul 2016 07:10:34 +0000 (08:10 +0100)
If an "extras" cache file is corrupted, the system would not notice
and later fail with errors about missing entries. Add a test for this
which means we can fall back to re-parsing in those cases.

[YOCTO #9902]

(Bitbake rev: 51843d8f2bbe2e54db7593ca61984abe70423ef6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cache.py

index afd373da9b6998342c2466f4c5e32ef8a89d319e..b90d488b99bb5a04c604f6943721d54bf2946a3a 100644 (file)
@@ -556,6 +556,9 @@ class Cache(object):
             if virtualfn not in self.depends_cache:
                 logger.debug(2, "Cache: %s is not cached", virtualfn)
                 invalid = True
+            elif len(self.depends_cache[virtualfn]) != len(self.caches_array):
+                logger.debug(2, "Cache: Extra caches missing for %s?" % virtualfn)
+                invalid = True
 
         # If any one of the variants is not present, mark as invalid for all
         if invalid: