summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
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() ):