summaryrefslogtreecommitdiffstats
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:09:26 +0100
commitbe78283e6cd7bea2eb1a5c5b797f1a6315468da5 (patch)
treeaeea636a907e92ec866a62654a4f0b7f37535349
parent3e9456322d1c7a932697f5cf81bf4a4989b21f54 (diff)
downloadpoky-be78283e6cd7bea2eb1a5c5b797f1a6315468da5.tar.gz
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 <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cache.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 9e89742235..eee83b7d09 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -524,6 +524,15 @@ class Cache(object):
524 self.remove(fn) 524 self.remove(fn)
525 return False 525 return False
526 526
527 if hasattr(info_array[0], 'file_checksums'):
528 for _, fl in info_array[0].file_checksums.items():
529 for f in fl.split():
530 if not os.path.exists(f):
531 logger.debug(2, "Cache: %s's file checksum list file %s was removed",
532 fn, f)
533 self.remove(fn)
534 return False
535
527 if appends != info_array[0].appends: 536 if appends != info_array[0].appends:
528 logger.debug(2, "Cache: appends for %s changed", fn) 537 logger.debug(2, "Cache: appends for %s changed", fn)
529 logger.debug(2, "%s to %s" % (str(appends), str(info_array[0].appends))) 538 logger.debug(2, "%s to %s" % (str(appends), str(info_array[0].appends)))