diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-08-04 13:26:27 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-08-04 13:26:27 +0000 |
commit | 471564bc7111bc5488f77180d401347787df6f8a (patch) | |
tree | fbed670a8413137b14d56438e8d758d220892b9a | |
parent | b6f4c2ec5d50bb9c336e8c5343075381a9263219 (diff) | |
download | bitbake-471564bc7111bc5488f77180d401347787df6f8a.tar.gz |
bitbake/bin/bitbake:
-Pass a configuration instance to pkgdata
bitbake/lib/bb/data.py:
-take an optional configuration for pkgdata
to prepare merging the '[pickle,unpickle]_prep'
protis older cow work.
-rwxr-xr-x | bin/bitbake | 2 | ||||
-rw-r--r-- | lib/bb/data.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/bitbake b/bin/bitbake index e01da6932..d327a69ab 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -785,7 +785,7 @@ class BBCooker: self.cb = progressCallback parsed, cached, skipped, masked = 0, 0, 0, 0 self.cache = bb.data.getVar( "CACHE", self.configuration.data, 1 ) - self.pkgdata = data.pkgdata( not self.cache in [None, ''], self.cache ) + self.pkgdata = data.pkgdata( not self.cache in [None, ''], self.cache, self.configuration.data ) if not self.cache in [None, '']: if self.cb is not None: diff --git a/lib/bb/data.py b/lib/bb/data.py index 39ff2a7e3..ffd5ad318 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -57,10 +57,11 @@ class DataDictCache: """ Databacked Dictionary implementation """ - def __init__(self, cache_dir): + def __init__(self, cache_dir, config): self.cache_dir = cache_dir self.files = [] self.dirty = {} + self.config = config def has_key(self,key): return key in self.files @@ -110,12 +111,12 @@ def init_db(cache,name,clean,parent = None): def init_db_mtime(cache,cache_bbfile): return _dict_p_type.mtime(cache,cache_bbfile) -def pkgdata(use_cache, cache): +def pkgdata(use_cache, cache, config = None): """ Return some sort of dictionary to lookup parsed dictionaires """ if use_cache: - return DataDictCache(cache) + return DataDictCache(cache, config) return DataDictFull() def createCopy(source): |