diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-02-27 22:37:32 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-27 20:10:40 +0000 |
commit | a295cdc19f5e96a255d096c37678b197b6e7cda5 (patch) | |
tree | fd4f0dd36fe04529bc0fa65e724fba875358805f /bitbake | |
parent | f420fb3de1f588a51dd6009452c7836903fa9158 (diff) | |
download | poky-a295cdc19f5e96a255d096c37678b197b6e7cda5.tar.gz |
data_smart.py: Uses BB_HASHCONFIG_WHITELIST to filter unnecessary variables
Adopt the BB_HASHCONFIG_WHITELIST as a exclusion list for variables that are
not needed in cache hash calculation.
(Bitbake rev: ae8cf138b5eb8f1f28a7143b8d67ad06cbe43061)
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
CC: Christopher Larson <kergoth@gmail.com>
CC: Martin Jansa <martin.jansa@gmail.com>
CC: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 24c7a8fd64..7765f81b52 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -463,20 +463,12 @@ class DataSmart(MutableMapping): | |||
463 | 463 | ||
464 | def get_hash(self): | 464 | def get_hash(self): |
465 | data = "" | 465 | data = "" |
466 | keys = iter(self) | 466 | config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split()) |
467 | keys = set(key for key in iter(self) if not key.startswith("__")) | ||
467 | for key in keys: | 468 | for key in keys: |
468 | if key in ["TIME", "DATE"]: | 469 | if key in config_whitelist: |
469 | continue | 470 | continue |
470 | if key == "__depends": | 471 | value = self.getVar(key, False) or "" |
471 | deps = list(self.getVar(key, False)) | ||
472 | deps.sort() | ||
473 | value = [deps[i][0] for i in range(len(deps))] | ||
474 | elif key == "PATH": | ||
475 | path = list(set(self.getVar(key, False).split(':'))) | ||
476 | path.sort() | ||
477 | value = " ".join(path) | ||
478 | else: | ||
479 | value = self.getVar(key, False) or "" | ||
480 | data = data + key + ': ' + str(value) + '\n' | 472 | data = data + key + ': ' + str(value) + '\n' |
481 | 473 | ||
482 | return hashlib.md5(data).hexdigest() | 474 | return hashlib.md5(data).hexdigest() |