diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-06-25 14:59:05 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-25 17:59:17 +0100 |
commit | 8e9501ffa8726d69412d669580d787ffedb88d34 (patch) | |
tree | 4a916e780488ab5a172a460dbb4ccd4dc87197d9 /meta/recipes-devtools | |
parent | e3e9cf02cdf9fd4f3a1a3b73e232a390abe05321 (diff) | |
download | poky-8e9501ffa8726d69412d669580d787ffedb88d34.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 rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rwxr-xr-x | meta/recipes-devtools/installer/adt-installer/adt_installer | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer index c0123913ef..58728afd63 100755 --- a/meta/recipes-devtools/installer/adt-installer/adt_installer +++ b/meta/recipes-devtools/installer/adt-installer/adt_installer | |||
@@ -339,11 +339,16 @@ if [ "$INSTALL_FOLDER" = "" ]; then | |||
339 | INSTALL_FOLDER=$DEFAULT_INSTALL_FOLDER | 339 | INSTALL_FOLDER=$DEFAULT_INSTALL_FOLDER |
340 | fi | 340 | fi |
341 | 341 | ||
342 | eval INSTALL_FOLDER=$INSTALL_FOLDER | 342 | eval INSTALL_FOLDER=$(printf "%q" "$INSTALL_FOLDER") |
343 | if [ -d $INSTALL_FOLDER ]; then | 343 | if [ -d "$INSTALL_FOLDER" ]; then |
344 | export INSTALL_FOLDER=$(cd $INSTALL_FOLDER; pwd) | 344 | export INSTALL_FOLDER=$(cd "$INSTALL_FOLDER"; pwd) |
345 | else | 345 | else |
346 | export INSTALL_FOLDER=$(readlink -m $INSTALL_FOLDER) | 346 | export INSTALL_FOLDER=$(readlink -m "$INSTALL_FOLDER") |
347 | fi | ||
348 | |||
349 | if [ -n "$(echo $INSTALL_FOLDER|grep ' ')" ]; then | ||
350 | echo "The target directory path ($INSTALL_FOLDER) contains spaces. Abort!" | ||
351 | exit 1 | ||
347 | fi | 352 | fi |
348 | 353 | ||
349 | clear | 354 | clear |