summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-07-18 00:09:26 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-19 00:08:58 +0100
commit6403cd034c1df7dc07c8073e000c63ba030a8ab1 (patch)
tree403f0eb1c3f40d23cf7f4ca9050e2f2e1c113832 /meta
parentf07c17dcee56c8c020b965bf62d81209a6d2eca4 (diff)
downloadpoky-6403cd034c1df7dc07c8073e000c63ba030a8ab1.tar.gz
populate_sdk_base: ensure that filenames with empty space character are handled
When extracting toolchain, if the list $executable_files has filenames with empty space character, the list will created but relocate_sdk.sh will not handle it well. This will lead to the below erro: ./tmp/deploy/sdk/buildtools-mytools-x86_64-nativesdk-standalone-1.6.1.0.sh Enter target directory for SDK (default: /opt/mydistro/mytoolset/1.6.1.0): You are about to install the SDK to "/opt/mydistro/mytoolset/1.6.1.0". Proceed[Y/n]? Extracting SDK...done Setting it up.../opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: sintaxe error `token' `(' /opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: `e The same occurs with replacement of ${SDKPATH} in configs/scripts/etc files. We should ensure that full path is protected before relocate_sdk.sh and ${SDKPATH} replacement calls. (From OE-Core rev: d7adf8349a65da6f0fdd0f00e606e8bc27ce3f28) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk_base.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a12bf1169e..0df98db7d8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -252,7 +252,7 @@ if [ "$dl_path" = "" ] ; then
252 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" 252 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
253 exit 1 253 exit 1
254fi 254fi
255executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111) 255executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -printf "'%h/%f' ")
256 256
257tdir=`mktemp -d` 257tdir=`mktemp -d`
258if [ x$tdir = x ] ; then 258if [ x$tdir = x ] ; then
@@ -273,7 +273,7 @@ if [ $relocate = 1 ] ; then
273fi 273fi
274 274
275# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc 275# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
276$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" 276$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|awk -F':' '{printf "%s\0", $1}'|$SUDO_EXEC xargs -0 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
277 277
278# change all symlinks pointing to ${SDKPATH} 278# change all symlinks pointing to ${SDKPATH}
279for l in $($SUDO_EXEC find $native_sysroot -type l); do 279for l in $($SUDO_EXEC find $native_sysroot -type l); do