summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-12-04 14:16:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-04 18:02:01 +0000
commit4bec4e78502b1d3fbe3c1f95b737c19f15e3c1c1 (patch)
tree20a6d069bdd95620ce86b6bc95af6a8b29c9c78e /meta/classes
parent2fc707a55c8d6b3f2dc3e636f8c579531ef3535d (diff)
downloadpoky-4bec4e78502b1d3fbe3c1f95b737c19f15e3c1c1.tar.gz
populate_sdk_base: mkdir was missing $SUDO_EXEC prefix
mkdir was in the wrong place and missing sudo rights. Hence, the installation to default location (or any other for which the user didn't have rights) would fail. Unless the installer itself is run with sudo. (From OE-Core rev: 555d03c466490ab12b2b1d049736593da2334e97) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_base.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 691ae45c93..f0b88b34c3 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -187,9 +187,6 @@ if [ "$answer" != "Y" -a "$answer" != "y" ]; then
187 exit 1 187 exit 1
188fi 188fi
189 189
190# create dir and don't care about the result.
191mkdir -p $target_sdk_dir >/dev/null 2>&1
192
193# if don't have the right to access dir, gain by sudo 190# if don't have the right to access dir, gain by sudo
194if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then 191if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
195 SUDO_EXEC=$(which "sudo") 192 SUDO_EXEC=$(which "sudo")
@@ -203,6 +200,9 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
203 [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1 200 [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
204fi 201fi
205 202
203# create dir and don't care about the result.
204$SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
205
206payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) 206payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
207 207
208printf "Extracting SDK..." 208printf "Extracting SDK..."