aboutsummaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2015-07-16 13:34:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-20 10:40:40 +0100
commit2563aa55281c60c877d8a298b6884ee7da550234 (patch)
tree46b239e6fac44e050c7741db7c871ffb5c95b169 /meta/files
parent873b8edd4100aa6a0d21e2bea20fbe7539de041a (diff)
downloadopenembedded-core-contrib-2563aa55281c60c877d8a298b6884ee7da550234.tar.gz
extensible sdk: Error when trying to install as root.
Since the extensible sdk uses bitbake, which can't run as root, the sdk shouldn't be installed as root. Previously it would error out late into setup when bitbake errored saying not to run bitbake as root. Now the script errors with a message saying the extensible sdk can't be installed as root. [Yocto #7545] (From OE-Core rev: 309e8f4e536148056223f50637ed291c48d148ca) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/toolchain-shar-extract.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 8cb8783f97..0a33ee8f5d 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -71,6 +71,8 @@ if [ $verbose = 1 ] ; then
set -x
fi
+@SDK_PRE_INSTALL_COMMAND@
+
if [ "$target_sdk_dir" = "" ]; then
read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
[ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
@@ -116,6 +118,11 @@ mkdir -p $target_sdk_dir >/dev/null 2>&1
# if don't have the right to access dir, gain by sudo
if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
+ if [ "$SDK_EXTENSIBLE" = "1" ]; then
+ echo "Unable to access \"$target_sdk_dir\"."
+ exit 1
+ fi
+
SUDO_EXEC=$(which "sudo")
if [ -z $SUDO_EXEC ]; then
echo "No command 'sudo' found, please install sudo first. Abort!"