Patchwork toolchain-scripts: Fix sed regex does not match

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date July 23, 2014, 2:53 a.m.
Message ID <1406084022-19758-1-git-send-email-Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/76441/
State New
Headers show

Comments

Chong.Lu@windriver.com - July 23, 2014, 2:53 a.m.
Previously, we added incorrect path to handle for CANADIANEXTRAOS.
This patch fixes the sed regex does not match.

[YOCTO #6490]

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/classes/toolchain-scripts.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 413effe..4a7b32c 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -15,8 +15,9 @@  toolchain_create_sdk_env_script () {
 	touch $script
 	echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
 	EXTRAPATH=""
+	target_sys="${TARGET_SYS}"
 	for i in ${CANADIANEXTRAOS}; do
-		EXTRAPATH="$EXTRAPATH:"`echo ${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS} | sed -e 's,${TARGET_PREFIX},${TARGET_PREFIX}$i,g'`
+		EXTRAPATH="$EXTRAPATH:"`echo ${SDKPATHNATIVE}${bindir_nativesdk}/$target_sys | sed -e "s,$target_sys,${target_sys%linux*}$i,g"`
 	done
 	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$PATH' >> $script
 	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script