]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-shar-extract.sh: proper fix for additional env setup scripts
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 4 Dec 2015 02:42:50 +0000 (15:42 +1300)
committerRobert Yang <liezhi.yang@windriver.com>
Mon, 28 Dec 2015 07:03:15 +0000 (23:03 -0800)
buildtools-tarball uses a custom env setup script, which isn't named the
same as the default; thus unfortunately OE-Core revision
a36469c97c9cb335de1e95dea5141038f337df95 broke installation of
buildtools-tarball. Revert that and implement a more robust mechanism.

(From OE-Core master rev: 00e081b81ba8118959b724269ba9d18d42aba8a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/files/toolchain-shar-extract.sh
meta/files/toolchain-shar-relocate.sh

index 98b9f1cd98bedc0aedb8f39a97aa4de1df0171c8..6af37b723ad1952116e3f94eec40acc5a05ad45d 100644 (file)
@@ -169,9 +169,20 @@ echo "done"
 
 printf "Setting it up..."
 # fix environment paths
+real_env_setup_script=""
 for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
+       if grep -q 'OECORE_NATIVE_SYSROOT=' $env_setup_script; then
+               # Handle custom env setup scripts that are only named
+               # environment-setup-* so that they have relocation
+               # applied - what we want beyond here is the main one
+               # rather than the one that simply sorts last
+               real_env_setup_script="$env_setup_script"
+       fi
        $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $env_setup_script
 done
+if [ -n "$real_env_setup_script" ] ; then
+       env_setup_script="$real_env_setup_script"
+fi
 
 @SDK_POST_INSTALL_COMMAND@
 
index d58e4ed152db7b20ed9acbf71ed561954bb40c1d..4ef29271712133bddf2bc825d18881380edc53a0 100644 (file)
@@ -1,5 +1,3 @@
-#reset the env_setup_script value to the proper value
-env_setup_script=$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@
 # 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 '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")