Patchwork [bitbake-devel] lib/bb/ invalidate cache when file checksum entry no longer exists

mail settings
Submitter Paul Eggleton
Date June 4, 2013, 8:59 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/51123/
State Accepted
Commit a30c335b887d58b022838bf0724f4c244cdd845b
Headers show


Paul Eggleton - June 4, 2013, 8:59 a.m.
Go through the cached list of file checksums and check if any of the
files no longer exist; if any are missing then invalidate the cached
recipe, which will force it to be reparsed and thus force the list of
files to be collected again. This prevents a warning when moving a file
to a different location that is still picked up by the recipe, e.g.
moving a file from a "files" subdirectory to one named with the recipe
name (${BPN}).

Fixes [YOCTO #4474].

Signed-off-by: Paul Eggleton <>
 lib/bb/ | 9 +++++++++
 1 file changed, 9 insertions(+)


diff --git a/lib/bb/ b/lib/bb/
index 9e89742..eee83b7 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -524,6 +524,15 @@  class Cache(object):
                     return False
+        if hasattr(info_array[0], 'file_checksums'):
+            for _, fl in info_array[0].file_checksums.items():
+                for f in fl.split():
+                    if not os.path.exists(f):
+                        logger.debug(2, "Cache: %s's file checksum list file %s was removed",
+                                        fn, f)
+                        self.remove(fn)
+                        return False
         if appends != info_array[0].appends:
             logger.debug(2, "Cache: appends for %s changed", fn)
             logger.debug(2, "%s to %s" % (str(appends), str(info_array[0].appends)))