* [PATCH] data_smart: Improve get_hash to account for overrides and key expansion
@ 2012-11-29 10:29 Richard Purdie
2012-11-29 16:20 ` Trevor Woerner
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2012-11-29 10:29 UTC (permalink / raw)
To: bitbake-devel
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>
---
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):
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())])
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] data_smart: Improve get_hash to account for overrides and key expansion
2012-11-29 10:29 [PATCH] data_smart: Improve get_hash to account for overrides and key expansion Richard Purdie
@ 2012-11-29 16:20 ` Trevor Woerner
0 siblings, 0 replies; 2+ messages in thread
From: Trevor Woerner @ 2012-11-29 16:20 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel
Thank you. This patch solves the problem I was seeing.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-29 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 10:29 [PATCH] data_smart: Improve get_hash to account for overrides and key expansion Richard Purdie
2012-11-29 16:20 ` Trevor Woerner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.