diff options
author | Randy Witt <randy.e.witt@linux.intel.com> | 2015-07-16 13:34:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-20 10:39:00 +0100 |
commit | 309e8f4e536148056223f50637ed291c48d148ca (patch) | |
tree | 495fed394f4e35faf64892e8155df3e7d993c835 /meta/files | |
parent | 7785c496df839bd811cb33aef4b54158e81aa2c5 (diff) | |
download | openembedded-core-contrib-309e8f4e536148056223f50637ed291c48d148ca.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]
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 8cb8783f973..0a33ee8f5df 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!" |