From c690d5b8185ae11d4e56587759bc162191d5dfeb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 22 May 2015 14:34:51 +0000 Subject: bitbake: data_smart: VariableHistory: Ignore override duplicates and overlap with CoW functions Trying to look up a variable called 'copy' in COW is problematic due to internal implmentation details, at least avoid tracebacks from this. Also don't duplicate override history (which is an atrefact of changed override behaviour) as otherwise the bitbake -e output is convoluted. (Bitbake rev: dddff5b7b8e6c18515b43389cef35503468b843d) Signed-off-by: Richard Purdie --- bitbake/lib/bb/data_smart.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake/lib/bb/data_smart.py') diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 68efc7bb1c..d414bf4614 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -231,6 +231,10 @@ class VariableHistory(object): if var not in self.variables: self.variables[var] = [] + if not isinstance(self.variables[var], list): + return + if 'nodups' in loginfo and loginfo in self.variables[var]: + return self.variables[var].append(loginfo.copy()) def variable(self, var): @@ -460,6 +464,7 @@ class DataSmart(MutableMapping): loginfo = event.copy() loginfo['variable'] = shortvar loginfo['op'] = 'override[%s]:%s' % (override, loginfo['op']) + loginfo['nodups'] = True self.varhistory.record(**loginfo) override = None -- cgit v1.2.3-54-g00ecf