All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chin Huat Ang <chin.huat.ang@intel.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] toolchain-scripts: preserve host path in environment setup script
Date: Thu, 19 Apr 2018 13:11:10 +0100	[thread overview]
Message-ID: <1524139870.18865.86.camel@linuxfoundation.org> (raw)
In-Reply-To: <1524116800-25332-1-git-send-email-chin.huat.ang@intel.com>

On Thu, 2018-04-19 at 13:46 +0800, Chin Huat Ang 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@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

Hi,

Could you test something like this please?:

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index eeb320d15a8..1f6d1aa2bf4 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -62,7 +62,8 @@ 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 ". ${COREBASE}/oe-init-build-env ${TOPDIR}" >> $script
+       echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:$PATH' >> $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

Cheers,

Richard


      parent reply	other threads:[~2018-04-19 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  5:46 [PATCH] toolchain-scripts: preserve host path in environment setup script Chin Huat Ang
2018-04-19 10:29 ` Burton, Ross
2018-04-19 12:11 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524139870.18865.86.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=chin.huat.ang@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.