[OE-core] [PATCH] toolchain-scripts: preserve host path in environment setup script
Burton, Ross
ross.burton at intel.com
Thu Apr 19 10:29:08 UTC 2018
That would mean that the environment script has the *build system*
PATH on, when the intention here is to extend the *users* PATH.
The solution here would be to do:
echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:$PATH' >> $script
Bitbake only expands ${FOO} and not $FOO, so $PATH won't be expended
until the user runs the script.
Ross
On 19 April 2018 at 06:46, Chin Huat Ang <chin.huat.ang at intel.com> wrote:
> The environment setup script generated in the build directory has host paths
> filtered, sourcing this script will break runqemu as it requires host
> /bin/stty. To resolve this, the script generation now sets the PATH variable
> to include the original values obtain from BB_ORIGENV.
>
> [YOCTO #12695]
>
> Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
> ---
> meta/classes/toolchain-scripts.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index eeb320d..75f76d9 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -62,7 +62,7 @@ toolchain_create_tree_env_script () {
> script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
> rm -f $script
> touch $script
> - echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
> + echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${@d.getVar("BB_ORIGENV", False).getVar("PATH", False)}' >> $script
> echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
> echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
> echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list