[OE-core] [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell

Richard Purdie richard.purdie at linuxfoundation.org
Mon May 29 23:31:36 UTC 2017


On Mon, 2017-05-29 at 13:16 +0800, Chang Rebecca Swee Fun wrote:
> Toolchains are required to be prepopulated in sysroot before
> entering devshell.
> 
> [YOCTO #11464]
> 
> Signed-off-by: Chang Rebecca Swee Fun 
> ---
>  meta/classes/devshell.bbclass | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

This looks awfully complicated and I'm not sure this does much more
than this would:

-addtask devshell after do_patch
+addtask devshell after do_prepare_recipe_sysroot

Can someone explain to me why we want to do the below instead as I
think the effect is the same?

I did read the bug too but that didn't help answer my question.

Yes, this does mean devshell will now trigger a lot of more
dependencies and build but I think the change below would do the same
thing too.

Cheers,

Richard

> diff --git a/meta/classes/devshell.bbclass
> b/meta/classes/devshell.bbclass
> index 4de7ea6..770dcbd 100644
> --- a/meta/classes/devshell.bbclass
> +++ b/meta/classes/devshell.bbclass
> @@ -32,7 +32,16 @@ python () {
>         # can't manipulate the environment and variables here yet
> (see YOCTO #4795)
>         d.setVarFlag("do_devshell", "manualfakeroot", "1")
>         d.delVarFlag("do_devshell", "fakeroot")
> -} 
> +
> +    # We need to ensure that the toolchains are available in the
> sysroot
> +    # when running devshell (see YOCTO #11464)
> +    # We get the dependency for do_configure depends varflag and
> DEPENDS
> +    # variable, then append it to do_devshell depends varflag
> +    deps = d.getVarFlag('do_configure', 'depends') or ""
> +    for x in bb.utils.explode_deps(d.getVar('DEPENDS') or ""):
> +        deps += ' %s:do_populate_sysroot' % x
> +    d.appendVarFlag('do_devshell', 'depends', deps)
> +}
>  
>  def devpyshell(d):
>  
> -- 
> 2.7.4
> 



More information about the Openembedded-core mailing list