diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2006-04-16 17:39:07 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2006-04-16 17:39:07 +0000 |
commit | 4244b32348371f655632d97f0e347d730447d7ca (patch) | |
tree | 225a0762c7d8b227f684363d052e3f564c78f311 /lib | |
parent | a89122ac10d9a5cbe9ea1988ebd604c176240a78 (diff) | |
download | bitbake-contrib-4244b32348371f655632d97f0e347d730447d7ca.tar.gz |
bitbake/lib/bb/cache.py:
* Detect and remove deleted files from the cache
* Add/enable/fix cache debugging
bitbake/bin/bitbake:
* Cache rdepends and rrecommends against filenames as well as pn
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/cache.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py index 1d9ffbea6..5899356c0 100644 --- a/lib/bb/cache.py +++ b/lib/bb/cache.py @@ -157,16 +157,25 @@ class Cache: if self.cachedir in [None, '']: return False + # Check file still exists + if self.mtime(fn) == 0: + bb.debug(2, "Cache: %s not longer exists" % fn) + if fn in self.clean: + del self.clean[fn] + if fn in self.depends_cache: + del self.depends_cache[fn] + return False + # File isn't in depends_cache if not fn in self.depends_cache: - bb.note("Cache: %s is not cached" % fn) + bb.debug(2, "Cache: %s is not cached" % fn) if fn in self.clean: del self.clean[fn] return False # Check the file's timestamp if bb.parse.cached_mtime(fn) > self.getVar("CACHETIMESTAMP", fn, True): - bb.note("Cache: %s changed" % fn) + bb.debug(2, "Cache: %s changed" % fn) if fn in self.clean: del self.clean[fn] return False @@ -180,12 +189,12 @@ class Cache: old_mtime = int(old_mtime_s) new_mtime = bb.parse.cached_mtime(f) if (new_mtime > old_mtime): - bb.note("Cache: %s's dependency %s changed" % (fn, f)) + bb.debug(2, "Cache: %s's dependency %s changed" % (fn, f)) if fn in self.clean: del self.clean[fn] return False - #bb.note("Depends Cache: %s is clean" % fn) + bb.debug(2, "Depends Cache: %s is clean" % fn) if not fn in self.clean: self.clean[fn] = "" |