]> code.ossystems Code Review - openembedded-core.git/commitdiff
Pass the config metadata into the Cache constructor rather than the cooker
authorChris Larson <clarson@kergoth.com>
Tue, 6 Apr 2010 15:52:54 +0000 (08:52 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:31 +0000 (15:41 +0100)
Cache only uses the config metadata from the cooker, no need for the cooker itself.

(Bitbake rev: bf58d43444642d31293a341ce72292003ca5c162)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cache.py

index 1f180012e0cdfe8e42bb52e062430994bf463db0..f3ba714d46c9f7e38beb5373b43c359c61fe0871 100644 (file)
@@ -44,10 +44,10 @@ class Cache:
     """
     BitBake Cache implementation
     """
-    def __init__(self, cooker):
+    def __init__(self, data):
 
 
-        self.cachedir = bb.data.getVar("CACHE", cooker.configuration.data, True)
+        self.cachedir = bb.data.getVar("CACHE", data, True)
         self.clean = {}
         self.checked = {}
         self.depends_cache = {}
@@ -72,7 +72,7 @@ class Cache:
         # If any of configuration.data's dependencies are newer than the
         # cache there isn't even any point in loading it...
         newest_mtime = 0
-        deps = bb.data.getVar("__depends", cooker.configuration.data, True)
+        deps = bb.data.getVar("__depends", data, True)
         for f,old_mtime in deps:
             if old_mtime > newest_mtime:
                 newest_mtime = old_mtime
@@ -486,7 +486,7 @@ def init(cooker):
     Files causing parsing errors are evicted from the cache.
 
     """
-    return Cache(cooker)
+    return Cache(cooker.configuration.data)