summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
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/classes/populate_sdk_ext.bbclass
parent873b8edd4100aa6a0d21e2bea20fbe7539de041a (diff)
downloadpoky-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/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 8a80a563f0..b28413b8f5 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -173,6 +173,17 @@ install_tools() {
173 install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH} 173 install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}
174} 174}
175 175
176# Since bitbake won't run as root it doesn't make sense to try and install
177# the extensible sdk as root.
178sdk_ext_preinst() {
179 if [ "`id -u`" = "0" ]; then
180 echo "ERROR: The extensible sdk cannot be installed as root."
181 exit 1
182 fi
183 SDK_EXTENSIBLE="1"
184}
185SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
186
176# FIXME this preparation should be done as part of the SDK construction 187# FIXME this preparation should be done as part of the SDK construction
177sdk_ext_postinst() { 188sdk_ext_postinst() {
178 printf "\nExtracting buildtools...\n" 189 printf "\nExtracting buildtools...\n"