[oe-commits] [openembedded-core] 27/28: toolchain-scripts/meta-ide-support: Handle dash shells correctly

git at git.openembedded.org git at git.openembedded.org
Thu May 3 23:09:15 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit c4a5d1f5bf914572094f6c4eefb4d30b991dcb0f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu May 3 18:54:46 2018 +0100

    toolchain-scripts/meta-ide-support: Handle dash shells correctly
    
    Where /bin/sh is dash, the recent toolchain scripts change fails as the $(pwd)
    usage in oe-init-build-env doesn't function correctly. Fix this by saving
    and restoring the cwd and calling the script within its own directory.
    
    This fixes meta-ide-support on dash based systems.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 ee411dd..71da5e5 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 ". ${COREBASE}/oe-init-build-env ${TOPDIR}" >> $script
+	echo 'orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR}; cd $orig' >> $script
 	echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
 	echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
 	echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list