summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-10-04 16:19:45 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-07 09:37:34 +0100
commitee7e64f116608ab105ead99c7f1966158054d2b5 (patch)
tree63336893f45fe80393c28e72a4cf445eca0cfb8c /bitbake/lib/bb/data_smart.py
parent45392cc67a89afe468b179789c7fbeeb3aa67769 (diff)
downloadpoky-ee7e64f116608ab105ead99c7f1966158054d2b5.tar.gz
bitbake: bitbake/hob: removing extra parameters from conf files using hob
In Hob settings, there is a tab to add/remove extra settings. This patch implements a way to "remove" variables from conf files, through bitbake. But, to keep the history assigment of the variables synchronized, instead of removing, it replaces the lines with blank lines. [YOCTO #5284] (Bitbake rev: bd720fb63cef6b399619b8fbcaeb8d7710f2d6df) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index b6f5b78cda..a1cbaba62b 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -281,9 +281,13 @@ class VariableHistory(object):
281 lines.append(line) 281 lines.append(line)
282 return lines 282 return lines
283 283
284 def del_var_history(self, var): 284 def del_var_history(self, var, f=None, line=None):
285 """If file f and line are not given, the entire history of var is deleted"""
285 if var in self.variables: 286 if var in self.variables:
286 self.variables[var] = [] 287 if f and line:
288 self.variables[var] = [ x for x in self.variables[var] if x['file']!=f and x['line']!=line]
289 else:
290 self.variables[var] = []
287 291
288class DataSmart(MutableMapping): 292class DataSmart(MutableMapping):
289 def __init__(self, special = COWDictBase.copy(), seen = COWDictBase.copy() ): 293 def __init__(self, special = COWDictBase.copy(), seen = COWDictBase.copy() ):