From bb8a265b0fa61a502c95b830ac82715e6685e2ab Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Mon, 29 Jul 2013 11:44:58 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py') 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): def set_var_in_file(self, var, val, default_file=None): self.runCommand(["enableDataTracking"]) - self.server.runCommand(["setVarFile", var, val, default_file]) + self.server.runCommand(["setVarFile", var, val, default_file, "set"]) self.runCommand(["disableDataTracking"]) + def append_var_in_file(self, var, val, default_file=None): + self.server.runCommand(["setVarFile", var, val, default_file, "append"]) + + def append_to_bbfiles(self, val): + bbfiles = self.runCommand(["getVariable", "BBFILES", "False"]) or "" + bbfiles = bbfiles.split() + if val not in bbfiles: + self.append_var_in_file("BBFILES", val, "local.conf") + def get_parameters(self): # retrieve the parameters from bitbake params = {} -- cgit v1.2.3-54-g00ecf