[bitbake-devel] [PATCH 08/16] data_smart: VariableHistory: Ignore override duplicates and overlap with CoW functions

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jul 8 14:59:02 UTC 2015


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 atrifact of changed
override behviour) as otherwise the bitbake -e output is convoluted.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/data_smart.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 68efc7b..d414bf4 100644
--- a/lib/bb/data_smart.py
+++ b/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
-- 
2.1.0




More information about the bitbake-devel mailing list