diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-11-14 00:36:37 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:39 +0000 |
commit | 1d8a9b88560d27b79f88c37cecc4a7d386182db2 (patch) | |
tree | d256a2deeb1f12ef22e672fe993583344fd08eb6 /bitbake | |
parent | 7e1b709231803aaa64aeb5e47a3df1ac53c88ef2 (diff) | |
download | poky-1d8a9b88560d27b79f88c37cecc4a7d386182db2.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.
(Bitbake rev: de34a403e206867e09410ad4925c7b9cff04fee6)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cache.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 9b1003baf1..51eb3b82f7 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -298,10 +298,12 @@ class Cache: | |||
298 | if invalid: | 298 | if invalid: |
299 | for cls in (multi or "").split(): | 299 | for cls in (multi or "").split(): |
300 | virtualfn = self.realfn2virtual(fn, cls) | 300 | virtualfn = self.realfn2virtual(fn, cls) |
301 | logger.debug(2, "Cache: Removing %s from cache", virtualfn) | 301 | if virtualfn in self.clean: |
302 | del self.clean[virtualfn] | 302 | logger.debug(2, "Cache: Removing %s from cache", virtualfn) |
303 | logger.debug(2, "Cache: removing %s from cache", fn) | 303 | del self.clean[virtualfn] |
304 | del self.clean[fn] | 304 | if fn in self.clean: |
305 | logger.debug(2, "Cache: Marking %s as not clean", fn) | ||
306 | del self.clean[fn] | ||
305 | return False | 307 | return False |
306 | 308 | ||
307 | return True | 309 | return True |
@@ -311,10 +313,11 @@ class Cache: | |||
311 | Remove a fn from the cache | 313 | Remove a fn from the cache |
312 | Called from the parser in error cases | 314 | Called from the parser in error cases |
313 | """ | 315 | """ |
314 | logger.debug(1, "Removing %s from cache", fn) | ||
315 | if fn in self.depends_cache: | 316 | if fn in self.depends_cache: |
317 | logger.debug(1, "Removing %s from cache", fn) | ||
316 | del self.depends_cache[fn] | 318 | del self.depends_cache[fn] |
317 | if fn in self.clean: | 319 | if fn in self.clean: |
320 | logger.debug(1, "Marking %s as unclean", fn) | ||
318 | del self.clean[fn] | 321 | del self.clean[fn] |
319 | 322 | ||
320 | def sync(self): | 323 | def sync(self): |