From 1a8bcfc1eb89ccff834ba68fb514330b510976a2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 7 Apr 2020 15:07:21 +0100 Subject: data_smart: Handle hashing of datastores within datastores correctly If there is a datastore within a datastore (e.g. BB_ORIGENV) then get-hash() doesn;t correclty handle the contents using the memory address instead of the contents. This is a patch from dominik.jaeger@nokia.com which addresses this problem. Its been low priority since we don't include BB_ORIGENV anywhere this would cause an issue as standard. [YOCTO #12473] Signed-off-by: Richard Purdie --- lib/bb/data_smart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/bb/data_smart.py') diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 70257ab7f..7f1b6dcb4 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -1000,7 +1000,10 @@ class DataSmart(MutableMapping): continue value = d.getVar(key, False) or "" - data.update({key:value}) + if type(value) is type(self): + data.update({key:value.get_hash()}) + else: + data.update({key:value}) varflags = d.getVarFlags(key, internalflags = True) if not varflags: -- cgit 1.2.3-korg