[bitbake-devel] [PATCH_V2 06/16] hob & bitbake: append a value to a variable from hob throught bitbake
Voicu, Cristiana
cristiana.voicu at intel.com
Fri Jul 26 14:35:38 UTC 2013
Hi Paul,
I have implemented this way because Hob receives BB_FILES already expanded, when it uses getVariable() method.
Also I chose to save it hardcoded (using TOPDIR), to be more general in local.conf (in case the local.conf is moved)
Thanks,
Cristiana
-----Original Message-----
From: Paul Eggleton [mailto:paul.eggleton at linux.intel.com]
Sent: Friday, July 26, 2013 5:22 PM
To: Voicu, Cristiana
Cc: bitbake-devel at lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH_V2 06/16] hob & bitbake: append a value to a variable from hob throught bitbake
Hi Cristiana,
On Thursday 25 July 2013 14:42:19 Cristiana Voicu wrote:
> --- a/bitbake/lib/bb/ui/crumbs/builder.py
> +++ b/bitbake/lib/bb/ui/crumbs/builder.py
> @@ -440,6 +440,7 @@ class Builder(gtk.Window):
> self.handler.connect("recipe-populated",
> self.handler_recipe_populated_cb) self.handler.connect("package-populated",
> self.handler_package_populated_cb)
>
> +
> + self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/*bb")
Shoudn't this be /*.bb ?
> self.initiate_new_build_async()
>
> 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 42fd0b9..e13ebe7
> 100644
> --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -471,9 +471,22 @@ 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"]) or ""
> + bbfiles = bbfiles.split()
> + # replace TOPDIR in val, if necessary
> + if "${TOPDIR}" in val:
> + topdir = self.get_topdir()
> + val = val.replace("${TOPDIR}", topdir)
> + if val not in bbfiles:
> + self.append_var_in_file("BBFILES",
> "${TOPDIR}/recipes/images/*bb", "local.conf") +
1) We should not be expanding ${TOPDIR} using direct string replacement. Do we even need to do this?
2) In any case it appears to be using a hardcoded value instead of val when it calls append_var_in_file()
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list