summaryrefslogtreecommitdiffstats
path: root/lib/bb/cache.py
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-14 00:36:37 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-15 16:28:10 +0100
commitde34a403e206867e09410ad4925c7b9cff04fee6 (patch)
tree9d5b1ae6d4053af10e5a610501aa65f4056143d6 /lib/bb/cache.py
parent6e24f573a0e95068eb9237c1d264ad1148b2f690 (diff)
downloadbitbake-de34a403e206867e09410ad4925c7b9cff04fee6.tar.gz
bb.cache: only log if the respective action was taken
This avoids alot of misleading log-messages like "Removing FOO from cache" if FOO was not in the cache and as such is not a removal candidate. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r--lib/bb/cache.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index d1ba37ada..63f218dee 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -298,10 +298,12 @@ class Cache:
if invalid:
for cls in (multi or "").split():
virtualfn = self.realfn2virtual(fn, cls)
- logger.debug(2, "Cache: Removing %s from cache", virtualfn)
- del self.clean[virtualfn]
- logger.debug(2, "Cache: removing %s from cache", fn)
- del self.clean[fn]
+ if virtualfn in self.clean:
+ logger.debug(2, "Cache: Removing %s from cache", virtualfn)
+ del self.clean[virtualfn]
+ if fn in self.clean:
+ logger.debug(2, "Cache: Marking %s as not clean", fn)
+ del self.clean[fn]
return False
return True
@@ -311,10 +313,11 @@ class Cache:
Remove a fn from the cache
Called from the parser in error cases
"""
- logger.debug(1, "Removing %s from cache", fn)
if fn in self.depends_cache:
+ logger.debug(1, "Removing %s from cache", fn)
del self.depends_cache[fn]
if fn in self.clean:
+ logger.debug(1, "Marking %s as unclean", fn)
del self.clean[fn]
def sync(self):