From: Richard Purdie Date: Thu, 3 May 2018 17:54:46 +0000 (+0100) Subject: toolchain-scripts/meta-ide-support: Handle dash shells correctly X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6689c1dae69fa196266ad5f0a170e49d0b20ae6;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. (From OE-Core rev: dceca6d34071b4cbef9e28bbf19dc12f5d925525) Signed-off-by: Richard Purdie --- diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index ee411ddca01..71da5e54092 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