Patchwork populate_sdk_base.bbclass: allow $OECORE_NATIVE_SYSROOT in sdk_env_script

login
register
mail settings
Submitter Bernhard Guillon
Date July 4, 2013, 9:16 a.m.
Message ID <1372929391-26767-1-git-send-email-Bernhard.Guillon@hale.at>
Download mbox | patch
Permalink /patch/52949/
State Accepted
Commit d8cba3391230f546e2830aebe1dabafbb789aa36
Headers show

Comments

Bernhard Guillon - July 4, 2013, 9:16 a.m.
From: Bernhard Guillon <Bernhard.Guillon@hale.at>

Only grep for 'OECORE_NATIVE_SYSROOT=' otherwise things like

toolchain_create_sdk_env_script_append() {
    echo 'export MY_DIR_FOO=$OECORE_NATIVE_SYSROOT/my/dir/foo' >> $script
}

trigger the following error while executing the install script:

find: `$OECORE_NATIVE_SYSROOT/my/dir/foo': No such file or directory

Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at>
---
 meta/classes/populate_sdk_base.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index e5bc0b4..cb3a211 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -243,7 +243,7 @@  for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
 done
 
 # fix dynamic loader paths in all ELF SDK binaries
-native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep OECORE_NATIVE_SYSROOT|cut -d'=' -f2|tr -d '"')
+native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
 if [ "$dl_path" = "" ] ; then
 	echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"