]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: cache: If one virtual of a recipe is uncached, remove all versions from...
authorRichard Purdie <rpurdie@linux.intel.com>
Sun, 25 Jul 2010 10:33:11 +0000 (11:33 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Sun, 25 Jul 2010 10:33:11 +0000 (11:33 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cache.py

index b5c7043c640b5f91d1816ae8b22a4aee7dfeb271..21cbad915efe0cb642740bae896828c1b602a63b 100644 (file)
@@ -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