Patchwork [bitbake-devel,1/2] cooker: delVar in removeConfigurationVar

login
register
mail settings
Submitter Marius Avram
Date March 25, 2014, 1:02 p.m.
Message ID <1395752530-24031-1-git-send-email-marius.avram@intel.com>
Download mbox | patch
Permalink /patch/69161/
State New
Headers show

Comments

Marius Avram - March 25, 2014, 1:02 p.m.
When a variable was removed from a configuration file it was not
removed from memory. This also had the effect of not allowing
to set a new value for the same variable with saveConfigurationVar.

Signed-off-by: Marius Avram <marius.avram@intel.com>
---
 bitbake/lib/bb/cooker.py |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 07202e3..e4cff3a 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -334,6 +334,8 @@  class BBCooker:
                         contents[begin_line] = "\n"
                     #remove var from history
                     self.data.varhistory.del_var_history(var, conf_file, line)
+                    #remove variable
+                    self.data.delVar(var)
 
                 with open(conf_file, 'w') as f:
                     f.writelines(contents)