diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-01-25 16:10:12 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-31 12:46:19 +0000 |
commit | f0aef9953d3504e673c8572f1ae64cefdf678b0f (patch) | |
tree | 51ff6cfd3d4d307074eb5ffd9956ee177c75717c /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
parent | 33c6c411ea7ada066122b758b05abf7472ca0a16 (diff) | |
download | poky-f0aef9953d3504e673c8572f1ae64cefdf678b0f.tar.gz |
bitbake: bitbake & hob: implement functions to assure consistency for configuration files
Added a new command in bitbake to save a variable in a file; added a function
in cooker which is called by this command.
Added new command in bitbake to enable/disable data tracking.
The function saveConfigurationVar from cooker.py saves a variable in the file that
is received by argument. It checks all the operations made on that variable, using the history.
If it's the first time when it does some changes on a variable,it comments the lines where
an operation is made on it, and it sets it in a line to the end of file. If it's not
the first time(it has a comment before), it replaces the line.
Made some changes in hob to save the variables from bblayers.conf and local.conf
using the bitbake command.
[YOCTO #2934]
(Bitbake rev: 55b814ccfa413d461d12956896364ab63eed70a8)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 41022ef8eb..d953f3497c 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -146,7 +146,9 @@ class HobHandler(gobject.GObject): | |||
146 | elif next_command == self.SUB_MATCH_CLASS: | 146 | elif next_command == self.SUB_MATCH_CLASS: |
147 | self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"]) | 147 | self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"]) |
148 | elif next_command == self.SUB_PARSE_CONFIG: | 148 | elif next_command == self.SUB_PARSE_CONFIG: |
149 | self.runCommand(["enableDataTracking"]) | ||
149 | self.runCommand(["parseConfigurationFiles", "", ""]) | 150 | self.runCommand(["parseConfigurationFiles", "", ""]) |
151 | self.runCommand(["disableDataTracking"]) | ||
150 | elif next_command == self.SUB_GNERATE_TGTS: | 152 | elif next_command == self.SUB_GNERATE_TGTS: |
151 | self.runCommand(["generateTargetsTree", "classes/image.bbclass", []]) | 153 | self.runCommand(["generateTargetsTree", "classes/image.bbclass", []]) |
152 | elif next_command == self.SUB_GENERATE_PKGINFO: | 154 | elif next_command == self.SUB_GENERATE_PKGINFO: |
@@ -451,6 +453,9 @@ class HobHandler(gobject.GObject): | |||
451 | ret.append(i) | 453 | ret.append(i) |
452 | return " ".join(ret) | 454 | return " ".join(ret) |
453 | 455 | ||
456 | def set_var_in_file(self, var, val, default_file=None): | ||
457 | self.server.runCommand(["setVarFile", var, val, default_file]) | ||
458 | |||
454 | def get_parameters(self): | 459 | def get_parameters(self): |
455 | # retrieve the parameters from bitbake | 460 | # retrieve the parameters from bitbake |
456 | params = {} | 461 | params = {} |