From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] lib/bb/cache.py: invalidate cache when file checksum entry no longer exists
Date: Tue, 4 Jun 2013 09:59:37 +0100 [thread overview]
Message-ID: <1370336377-6394-1-git-send-email-paul.eggleton@linux.intel.com> (raw)
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>
---
lib/bb/cache.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 9e89742..eee83b7 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)))
--
1.8.1.2
reply other threads:[~2013-06-04 8:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370336377-6394-1-git-send-email-paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.