diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-25 11:33:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-25 11:33:11 +0100 |
commit | 7edde59de4fd8b19af55e8377138db6ee3dbb3d8 (patch) | |
tree | 8bebeea3b34aaa131da0143ba006fd3fd139d382 /bitbake | |
parent | 36cfff8ed5b8a777a09cc8abcd8b01a1f297e404 (diff) | |
download | poky-7edde59de4fd8b19af55e8377138db6ee3dbb3d8.tar.gz |
bitbake: cache: If one virtual of a recipe is uncached, remove all versions from the cache
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cache.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index b5c7043c64..21cbad915e 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -285,11 +285,25 @@ class Cache: | |||
285 | if not fn in self.clean: | 285 | if not fn in self.clean: |
286 | self.clean[fn] = "" | 286 | self.clean[fn] = "" |
287 | 287 | ||
288 | invalid = False | ||
288 | # Mark extended class data as clean too | 289 | # Mark extended class data as clean too |
289 | multi = self.getVar('__VARIANTS', fn, True) | 290 | multi = self.getVar('__VARIANTS', fn, True) |
290 | for cls in (multi or "").split(): | 291 | for cls in (multi or "").split(): |
291 | virtualfn = self.realfn2virtual(fn, cls) | 292 | virtualfn = self.realfn2virtual(fn, cls) |
292 | self.clean[virtualfn] = "" | 293 | self.clean[virtualfn] = "" |
294 | if not virtualfn in self.depends_cache: | ||
295 | bb.msg.debug(2, bb.msg.domain.Cache, "Cache: %s is not cached" % virtualfn) | ||
296 | invalid = True | ||
297 | |||
298 | # If any one of the varients is not present, mark cache as invalid for all | ||
299 | if invalid: | ||
300 | for cls in (multi or "").split(): | ||
301 | virtualfn = self.realfn2virtual(fn, cls) | ||
302 | bb.msg.debug(2, bb.msg.domain.Cache, "Cache: Removing %s from cache" % virtualfn) | ||
303 | del self.clean[virtualfn] | ||
304 | bb.msg.debug(2, bb.msg.domain.Cache, "Cache: Removing %s from cache" % fn) | ||
305 | del self.clean[fn] | ||
306 | return False | ||
293 | 307 | ||
294 | return True | 308 | return True |
295 | 309 | ||