summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-29 10:29:06 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-07 17:25:55 (GMT)
commit3f15153bebc3f80a3db1ec7a8a4eadb42279d524 (patch)
treeac4d9fcf1a9c65cc290210d6c11fb517fedc5b2a
parentad4e3ee74c7baaeb0d4916f71f0a6572d2936c1e (diff)
downloadpoky-3f15153bebc3f80a3db1ec7a8a4eadb42279d524.tar.gz
bitbake: 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] (Bitbake rev: abc3809480b97f1501cae44f13a349cabd01579f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/data_smart.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index ec3c04e..fb8d9d5 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -474,12 +474,16 @@ class DataSmart(MutableMapping):
474 474
475 def get_hash(self): 475 def get_hash(self):
476 data = {} 476 data = {}
477 config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split()) 477 d = self.createCopy()
478 keys = set(key for key in iter(self) if not key.startswith("__")) 478 bb.data.expandKeys(d)
479 bb.data.update_data(d)
480
481 config_whitelist = set((d.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
482 keys = set(key for key in iter(d) if not key.startswith("__"))
479 for key in keys: 483 for key in keys:
480 if key in config_whitelist: 484 if key in config_whitelist:
481 continue 485 continue
482 value = self.getVar(key, False) or "" 486 value = d.getVar(key, False) or ""
483 data.update({key:value}) 487 data.update({key:value})
484 488
485 data_str = str([(k, data[k]) for k in sorted(data.keys())]) 489 data_str = str([(k, data[k]) for k in sorted(data.keys())])