summaryrefslogtreecommitdiffstats
path: root/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-04 14:35:09 +0100
commitbd720fb63cef6b399619b8fbcaeb8d7710f2d6df (patch)
tree64822e20dc247734f3cf8e2e369d7144dd86d669 /lib/bb/data_smart.py
parent2d0ec8ff083b636a6cf98de3278900eb95c3def6 (diff)
downloadbitbake-contrib-bd720fb63cef6b399619b8fbcaeb8d7710f2d6df.tar.gz
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] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index b6f5b78cd..a1cbaba62 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -281,9 +281,13 @@ class VariableHistory(object):
lines.append(line)
return lines
- def del_var_history(self, var):
+ def del_var_history(self, var, f=None, line=None):
+ """If file f and line are not given, the entire history of var is deleted"""
if var in self.variables:
- self.variables[var] = []
+ if f and line:
+ self.variables[var] = [ x for x in self.variables[var] if x['file']!=f and x['line']!=line]
+ else:
+ self.variables[var] = []
class DataSmart(MutableMapping):
def __init__(self, special = COWDictBase.copy(), seen = COWDictBase.copy() ):