: data_smart.py: use BB_HASH_WHITELIST as variable filter
Hi Richard,
This pull request changes the cache hash calculation method that uses BB_HASH_WHITELIST as variable filter.
Please help to review and pull.
Thanks,
Dongxiao
The following changes since commit 4d173d441d2beb8e6492b6b1842682f8cf32e6cc:
V5 Disk space monitoring (2012-02-26 11:03:50 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/bitbake-bugfix
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/bitbake-bugfix
Dongxiao Xu (1):
data_smart.py: Uses BB_HASH_WHITELIST to filter unnecessary variables
lib/bb/data_smart.py | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/1 data_smart.py: Uses BB_HASH_WHITELIST to filter unnecessary variables
Adopt the BB_HASH_WHITELIST as a exclusion list for variables that are not needed in cache hash calculation.
Signed-off-by Dongxiao Xu <[email protected]>
CC Christopher Larson <[email protected]>
CC Martin Jansa <[email protected]>
CC Andreas Oberritter <[email protected]>
--- lib/bb/data_smart.py | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-)
lib/bb/data_smart.py +4 -12
@@ -463,20 +463,12 @@ class DataSmart(MutableMapping): def get_hash(self): data = "" - keys = iter(self) + basewhitelist = set((self.getVar("BB_HASHBASE_WHITELIST", True) or "").split()) + keys = set(key for key in iter(self) if not key.startswith("__")) for key in keys: - if key in ["TIME", "DATE"]: + if key in basewhitelist: continue - if key == "__depends": - deps = list(self.getVar(key, False)) - deps.sort() - value = [deps[i][0] for i in range(len(deps))] - elif key == "PATH": - path = list(set(self.getVar(key, False).split(':'))) - path.sort() - value = " ".join(path) - else: - value = self.getVar(key, False) or "" + value = self.getVar(key, False) or "" data = data + key + ': ' + str(value) + '\n' return hashlib.md5(data).hexdigest()
Signature · 1 line
1.7.4.1