summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-29 10:29:06 +0000
committerRoss Burton <ross.burton@intel.com>2012-12-06 14:54:30 +0000
commitabc3809480b97f1501cae44f13a349cabd01579f (patch)
tree9371ef44907a87d1758a76c3c57f28af51ba81f9
parentf31d930e9b2aa483aa30f6e7f7ec9b9f1321e3a1 (diff)
downloadbitbake-abc3809480b97f1501cae44f13a349cabd01579f.tar.gz
data_smart: Improve get_hash to account for overrides and key expansion
An issue was uncovered where changing: IMAGE_INSTALL_append = "X" to IMAGE_INSTALL_append = "X Y" in local.conf would not get noticed by bitbake. The issue is that the configuration hash doesn't account for overrides or key expansion. This patch improves get_hash to account for these. This means the hash does account for changes like the above. [YOCTO #3503] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data_smart.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index ec3c04e30..fb8d9d53c 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -474,12 +474,16 @@ class DataSmart(MutableMapping):
def get_hash(self):
data = {}
- config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
- keys = set(key for key in iter(self) if not key.startswith("__"))
+ d = self.createCopy()
+ bb.data.expandKeys(d)
+ bb.data.update_data(d)
+
+ config_whitelist = set((d.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
+ keys = set(key for key in iter(d) if not key.startswith("__"))
for key in keys:
if key in config_whitelist:
continue
- value = self.getVar(key, False) or ""
+ value = d.getVar(key, False) or ""
data.update({key:value})
data_str = str([(k, data[k]) for k in sorted(data.keys())])