summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-25 11:33:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-25 11:33:11 +0100
commit7edde59de4fd8b19af55e8377138db6ee3dbb3d8 (patch)
tree8bebeea3b34aaa131da0143ba006fd3fd139d382 /bitbake/lib
parent36cfff8ed5b8a777a09cc8abcd8b01a1f297e404 (diff)
downloadopenembedded-core-7edde59de4fd8b19af55e8377138db6ee3dbb3d8.tar.gz
openembedded-core-7edde59de4fd8b19af55e8377138db6ee3dbb3d8.tar.bz2
openembedded-core-7edde59de4fd8b19af55e8377138db6ee3dbb3d8.tar.xz
openembedded-core-7edde59de4fd8b19af55e8377138db6ee3dbb3d8.zip
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/lib')
-rw-r--r--bitbake/lib/bb/cache.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index b5c7043c6..21cbad915 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -285,11 +285,25 @@ class Cache:
if not fn in self.clean:
self.clean[fn] = ""
+ invalid = False
# Mark extended class data as clean too
multi = self.getVar('__VARIANTS', fn, True)
for cls in (multi or "").split():
virtualfn = self.realfn2virtual(fn, cls)
self.clean[virtualfn] = ""
+ if not virtualfn in self.depends_cache:
+ bb.msg.debug(2, bb.msg.domain.Cache, "Cache: %s is not cached" % virtualfn)
+ invalid = True
+
+ # If any one of the varients is not present, mark cache as invalid for all
+ if invalid:
+ for cls in (multi or "").split():
+ virtualfn = self.realfn2virtual(fn, cls)
+ bb.msg.debug(2, bb.msg.domain.Cache, "Cache: Removing %s from cache" % virtualfn)
+ del self.clean[virtualfn]
+ bb.msg.debug(2, bb.msg.domain.Cache, "Cache: Removing %s from cache" % fn)
+ del self.clean[fn]
+ return False
return True