summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py2
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py17
2 files changed, 18 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 46023cc585..ab6750b741 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -218,7 +218,7 @@ class Configuration:
218 handler.set_var_in_file("SDKMACHINE", self.curr_sdk_machine, "local.conf") 218 handler.set_var_in_file("SDKMACHINE", self.curr_sdk_machine, "local.conf")
219 handler.set_var_in_file("CONF_VERSION", self.conf_version, "local.conf") 219 handler.set_var_in_file("CONF_VERSION", self.conf_version, "local.conf")
220 handler.set_var_in_file("LCONF_VERSION", self.lconf_version, "bblayers.conf") 220 handler.set_var_in_file("LCONF_VERSION", self.lconf_version, "bblayers.conf")
221 handler.set_var_in_file("EXTRA_SETTING", self.extra_setting, "local.conf") 221 handler.set_extra_config(self.extra_setting)
222 handler.set_var_in_file("TOOLCHAIN_BUILD", self.toolchain_build, "local.conf") 222 handler.set_var_in_file("TOOLCHAIN_BUILD", self.toolchain_build, "local.conf")
223 handler.set_var_in_file("IMAGE_FSTYPES", self.image_fstypes, "local.conf") 223 handler.set_var_in_file("IMAGE_FSTYPES", self.image_fstypes, "local.conf")
224 if not defaults: 224 if not defaults:
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 3f5bebaca3..393c258e46 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -21,6 +21,7 @@
21 21
22import gobject 22import gobject
23import logging 23import logging
24import ast
24from bb.ui.crumbs.runningbuild import RunningBuild 25from bb.ui.crumbs.runningbuild import RunningBuild
25 26
26class HobHandler(gobject.GObject): 27class HobHandler(gobject.GObject):
@@ -357,7 +358,20 @@ class HobHandler(gobject.GObject):
357 def set_incompatible_license(self, incompat_license): 358 def set_incompatible_license(self, incompat_license):
358 self.set_var_in_file("INCOMPATIBLE_LICENSE", incompat_license, "local.conf") 359 self.set_var_in_file("INCOMPATIBLE_LICENSE", incompat_license, "local.conf")
359 360
361 def set_extra_setting(self, extra_setting):
362 self.set_var_in_file("EXTRA_SETTING", extra_setting, "local.conf")
363
360 def set_extra_config(self, extra_setting): 364 def set_extra_config(self, extra_setting):
365 old_extra_setting = ast.literal_eval(self.runCommand(["getVariable", "EXTRA_SETTING"]) or "{}")
366 if extra_setting:
367 self.set_var_in_file("EXTRA_SETTING", extra_setting, "local.conf")
368 else:
369 self.remove_var_from_file("EXTRA_SETTING")
370
371 #remove not needed settings from conf
372 for key in old_extra_setting:
373 if key not in extra_setting:
374 self.remove_var_from_file(key)
361 for key in extra_setting.keys(): 375 for key in extra_setting.keys():
362 value = extra_setting[key] 376 value = extra_setting[key]
363 self.set_var_in_file(key, value, "local.conf") 377 self.set_var_in_file(key, value, "local.conf")
@@ -477,6 +491,9 @@ class HobHandler(gobject.GObject):
477 self.server.runCommand(["setVarFile", var, val, default_file, "earlyAssign"]) 491 self.server.runCommand(["setVarFile", var, val, default_file, "earlyAssign"])
478 self.runCommand(["disableDataTracking"]) 492 self.runCommand(["disableDataTracking"])
479 493
494 def remove_var_from_file(self, var):
495 self.server.runCommand(["removeVarFile", var])
496
480 def append_var_in_file(self, var, val, default_file=None): 497 def append_var_in_file(self, var, val, default_file=None):
481 self.server.runCommand(["setVarFile", var, val, default_file, "append"]) 498 self.server.runCommand(["setVarFile", var, val, default_file, "append"])
482 499