summaryrefslogtreecommitdiffstats
path: root/lib/bb/cache.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-06-04 09:59:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-07 17:12:15 +0100
commita30c335b887d58b022838bf0724f4c244cdd845b (patch)
treed7d2e91a22508cf65cc198994f4aa6085cce5d84 /lib/bb/cache.py
parent35790b507c7d50b95a99529fead6a173d54929f8 (diff)
downloadopenembedded-core-contrib-a30c335b887d58b022838bf0724f4c244cdd845b.tar.gz
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r--lib/bb/cache.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 9e89742235..eee83b7d09 100644
--- a/lib/bb/cache.py
+++ b/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)))