summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-07-29 11:44:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-06 13:02:24 +0100
commitbb8a265b0fa61a502c95b830ac82715e6685e2ab (patch)
treee9b9facdca1126f32037309e21d9dc30253367ea /bitbake/lib/bb/ui
parent116219ce09c63dfdbf1f57563c6d0b400bd96823 (diff)
downloadpoky-bb8a265b0fa61a502c95b830ac82715e6685e2ab.tar.gz
bitbake: hob & bitbake: append a value to a variable from hob throught bitbake
It was necessary to append ${TOPDIR}/recipes/images to BBFILES. Implemented the mechanism to append a value to a variable: a command and the method in cooker. [YOCTO #4193] (Bitbake rev: 4aedbee90bd92395c2460a68702e6ede00e256c9) 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')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py1
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py11
2 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 6bf402405d..3ddfb36a0c 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -440,6 +440,7 @@ class Builder(gtk.Window):
440 self.handler.connect("recipe-populated", self.handler_recipe_populated_cb) 440 self.handler.connect("recipe-populated", self.handler_recipe_populated_cb)
441 self.handler.connect("package-populated", self.handler_package_populated_cb) 441 self.handler.connect("package-populated", self.handler_package_populated_cb)
442 442
443 self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/*.bb")
443 self.initiate_new_build_async() 444 self.initiate_new_build_async()
444 445
445 signal.signal(signal.SIGINT, self.event_handle_SIGINT) 446 signal.signal(signal.SIGINT, self.event_handle_SIGINT)
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 42fd0b972b..7854742d4a 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -471,9 +471,18 @@ class HobHandler(gobject.GObject):
471 471
472 def set_var_in_file(self, var, val, default_file=None): 472 def set_var_in_file(self, var, val, default_file=None):
473 self.runCommand(["enableDataTracking"]) 473 self.runCommand(["enableDataTracking"])
474 self.server.runCommand(["setVarFile", var, val, default_file]) 474 self.server.runCommand(["setVarFile", var, val, default_file, "set"])
475 self.runCommand(["disableDataTracking"]) 475 self.runCommand(["disableDataTracking"])
476 476
477 def append_var_in_file(self, var, val, default_file=None):
478 self.server.runCommand(["setVarFile", var, val, default_file, "append"])
479
480 def append_to_bbfiles(self, val):
481 bbfiles = self.runCommand(["getVariable", "BBFILES", "False"]) or ""
482 bbfiles = bbfiles.split()
483 if val not in bbfiles:
484 self.append_var_in_file("BBFILES", val, "local.conf")
485
477 def get_parameters(self): 486 def get_parameters(self):
478 # retrieve the parameters from bitbake 487 # retrieve the parameters from bitbake
479 params = {} 488 params = {}