1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

Hob: Implement Hob config parse hook

To make Hob's specific variable settings take effect, we add a Hob
config hook at the end of parsing for each configuration file, and in
the hook function, Hob will set its own variables to the data store.

This fixes:
[YOCTO #2210]
[YOCTO #2254]

(Bitbake rev: 0ec7d1bbfd2e09ae60f99e6134b20ffd1d9145b1)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dongxiao Xu
2012-04-12 23:46:26 +08:00
committed by Richard Purdie
parent 302f2cc8ce
commit 9c1dcdceb2
2 changed files with 40 additions and 12 deletions
+26
View File
@@ -210,6 +210,30 @@ class Parameters:
self.tmpdir = params["tmpdir"]
self.enable_proxy = False
def hob_conf_filter(fn, data):
if fn.endswith("/local.conf"):
distro = data.getVar("DISTRO_HOB")
if distro:
if distro != "defaultsetup":
data.setVar("DISTRO", distro)
else:
data.delVar("DISTRO")
keys = ["MACHINE_HOB", "SDKMACHINE_HOB", "PACKAGE_CLASSES_HOB", \
"BB_NUMBER_THREADS_HOB", "PARALLEL_MAKE_HOB", "DL_DIR_HOB", \
"SSTATE_DIR_HOB", "SSTATE_MIRROR_HOB", "INCOMPATIBLE_LICENSE_HOB"]
for key in keys:
var_hob = data.getVar(key)
if var_hob:
data.setVar(key.split("_HOB")[0], var_hob)
return
if fn.endswith("/bblayers.conf"):
layers = data.getVar("BBLAYERS_HOB")
if layers:
data.setVar("BBLAYERS", layers)
return
class Builder(gtk.Window):
(MACHINE_SELECTION,
@@ -296,6 +320,8 @@ class Builder(gtk.Window):
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
self.handler.connect("command-failed", self.handler_command_failed_cb)
self.handler.set_config_filter(hob_conf_filter)
self.initiate_new_build_async()
def create_visual_elements(self):