From: Paul Eggleton Date: Tue, 4 Jun 2013 08:59:37 +0000 (+0100) Subject: bitbake: lib/bb/cache.py: invalidate cache when file checksum entry no longer exists X-Git-Tag: rev_ivi_2015_02_04~12261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=956fdcd92fb81e26824621d494aeb031dff8a94d;p=scm%2Fbb%2Ftizen-distro.git bitbake: lib/bb/cache.py: invalidate cache when file checksum entry no longer exists 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]. (Bitbake rev: e1aa103593c46612c4d9000524174983b5994dc9) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 9e89742..eee83b7 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -524,6 +524,15 @@ class Cache(object): self.remove(fn) 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)))