* [PATCH 0/1] populate_sdk_base, adt_installer: abort install if path contains spaces
@ 2013-06-25 11:59 Laurentiu Palcu
2013-06-25 11:59 ` [PATCH 1/1] " Laurentiu Palcu
0 siblings, 1 reply; 2+ messages in thread
From: Laurentiu Palcu @ 2013-06-25 11:59 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 87da29080429f1793845978901f5160701648c21:
sanity.bbclass: Various improvements (2013-06-24 15:41:33 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lpalcu/b4488_sdk_installer_handle_spaces
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b4488_sdk_installer_handle_spaces
Laurentiu Palcu (1):
populate_sdk_base, adt_installer: abort install if path contains
spaces
meta/classes/populate_sdk_base.bbclass | 13 +++++++++----
.../installer/adt-installer/adt_installer | 13 +++++++++----
2 files changed, 18 insertions(+), 8 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 1/1] populate_sdk_base, adt_installer: abort install if path contains spaces
2013-06-25 11:59 [PATCH 0/1] populate_sdk_base, adt_installer: abort install if path contains spaces Laurentiu Palcu
@ 2013-06-25 11:59 ` Laurentiu Palcu
0 siblings, 0 replies; 2+ messages in thread
From: Laurentiu Palcu @ 2013-06-25 11:59 UTC (permalink / raw)
To: openembedded-core
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]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/populate_sdk_base.bbclass | 13 +++++++++----
.../installer/adt-installer/adt_installer | 13 +++++++++----
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index e5bc0b4..31e848d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -181,11 +181,16 @@ else
echo "$target_sdk_dir"
fi
-eval target_sdk_dir=$target_sdk_dir
-if [ -d $target_sdk_dir ]; then
- target_sdk_dir=$(cd $target_sdk_dir; pwd)
+eval target_sdk_dir=$(printf "%q" "$target_sdk_dir")
+if [ -d "$target_sdk_dir" ]; then
+ target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
else
- target_sdk_dir=$(readlink -m $target_sdk_dir)
+ target_sdk_dir=$(readlink -m "$target_sdk_dir")
+fi
+
+if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
+ echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
+ exit 1
fi
if [ -e "$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" ]; then
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer
index c012391..58728af 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
INSTALL_FOLDER=$DEFAULT_INSTALL_FOLDER
fi
-eval INSTALL_FOLDER=$INSTALL_FOLDER
-if [ -d $INSTALL_FOLDER ]; then
- export INSTALL_FOLDER=$(cd $INSTALL_FOLDER; pwd)
+eval INSTALL_FOLDER=$(printf "%q" "$INSTALL_FOLDER")
+if [ -d "$INSTALL_FOLDER" ]; then
+ export INSTALL_FOLDER=$(cd "$INSTALL_FOLDER"; pwd)
else
- export INSTALL_FOLDER=$(readlink -m $INSTALL_FOLDER)
+ export INSTALL_FOLDER=$(readlink -m "$INSTALL_FOLDER")
+fi
+
+if [ -n "$(echo $INSTALL_FOLDER|grep ' ')" ]; then
+ echo "The target directory path ($INSTALL_FOLDER) contains spaces. Abort!"
+ exit 1
fi
clear
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-25 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 11:59 [PATCH 0/1] populate_sdk_base, adt_installer: abort install if path contains spaces Laurentiu Palcu
2013-06-25 11:59 ` [PATCH 1/1] " Laurentiu Palcu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox