[oe-commits] [bitbake] 02/06: cache: Correctly handle missing extra caches

git at git.openembedded.org git at git.openembedded.org
Fri Jul 22 10:41:48 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 51843d8f2bbe2e54db7593ca61984abe70423ef6
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Jul 21 17:27:35 2016 +0100

    cache: Correctly handle missing extra caches
    
    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]
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/cache.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index afd373d..b90d488 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list