summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-06-25 14:59:05 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:28:20 +0100
commiteb5ec8899d41d2df7fb9d9918d2d93042a678d97 (patch)
tree5d0ae16675728fcb1c03f54281c0747408c02aaf /meta/classes
parent64273e53f2789d2ea8393fc80909ac7086f168a7 (diff)
downloadpoky-eb5ec8899d41d2df7fb9d9918d2d93042a678d97.tar.gz
populate_sdk_base, adt_installer: abort install if path contains spaces
Spaces are not handled properly in some parts of oe-core and it's safer to abort toolchain installation if path contains spaces. Even though we fix space handling in the toolchain installation script, there are various other parts in the toolchain (perl scripts, sysroot path passed to toolchain binaries, shebang lines) that would need special handling. So, for now, just bail out if path contains spaces. The checking for spaces in the path is done after expanding relative paths to absolute and tilde conversion. [YOCTO #4488] (From OE-Core master rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63) (From OE-Core rev: 407e57879ea2f931bff32993b850c9d59d228303) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_base.bbclass13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index e5bc0b409d..31e848dd62 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -181,11 +181,16 @@ else
181 echo "$target_sdk_dir" 181 echo "$target_sdk_dir"
182fi 182fi
183 183
184eval target_sdk_dir=$target_sdk_dir 184eval target_sdk_dir=$(printf "%q" "$target_sdk_dir")
185if [ -d $target_sdk_dir ]; then 185if [ -d "$target_sdk_dir" ]; then
186 target_sdk_dir=$(cd $target_sdk_dir; pwd) 186 target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
187else 187else
188 target_sdk_dir=$(readlink -m $target_sdk_dir) 188 target_sdk_dir=$(readlink -m "$target_sdk_dir")
189fi
190
191if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
192 echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
193 exit 1
189fi 194fi
190 195
191if [ -e "$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" ]; then 196if [ -e "$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" ]; then