[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1942/8267] bitbake: cache/cooker: Pass databuilder into bb.cache.Cache()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1942/8267] bitbake: cache/cooker: Pass databuilder into bb.cache.Cache()
- Date: Sat, 16 Dec 2017 22:32:03 +0000 (UTC)
commit e79550ea8708f82aa720a47c5ed9a8aab1182458
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Mon Aug 15 18:01:54 2016 +0100
bitbake: cache/cooker: Pass databuilder into bb.cache.Cache()
Rather that the current mix of static and class methods, refactor
so that the cache has the databuilder object internally. This becomes
useful for the following patches for multi config support.
It effectively completes some of the object oriented work we've been
working towards in the bitbake core for a while.
(Bitbake rev: 7da062956bf40c1b9ac1aaee222a13f40bba9b19)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/cache.py | 5 +++--
bitbake/lib/bb/cooker.py | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index c915bb9..7118c83 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -270,7 +270,9 @@ class Cache(object):
BitBake Cache implementation
"""
- def __init__(self, data, data_hash, caches_array):
+ def __init__(self, databuilder, data_hash, caches_array):
+ data = databuilder.data
+
# Pass caches_array information into Cache Constructor
# It will be used later for deciding whether we
# need extra cache file dump/load support
@@ -279,7 +281,6 @@ class Cache(object):
self.clean = set()
self.checked = set()
self.depends_cache = {}
- self.data = None
self.data_fn = None
self.cacheclean = True
self.data_hash = data_hash
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 11c611d..43c4f78 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1974,6 +1974,7 @@ class CookerParser(object):
self.cooker = cooker
self.cfgdata = cooker.data
self.cfghash = cooker.data_hash
+ self.cfgbuilder = cooker.databuilder
# Accounting statistics
self.parsed = 0
@@ -1988,7 +1989,7 @@ class CookerParser(object):
self.current = 0
self.process_names = []
- self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array)
+ self.bb_cache = bb.cache.Cache(self.cfgbuilder, self.cfghash, cooker.caches_array)
self.fromcache = []
self.willparse = []
for filename in self.filelist:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]