Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
devel:hw
:
droid:tools
>
android-tools
> _service:gitpkg:0006-Require-r-option-Fix-broken-mount-for-HOME-in-some-i.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:gitpkg:0006-Require-r-option-Fix-broken-mount-for-HOME-in-some-i.patch of Package android-tools
From 61e373e9ecd57794c4f6e7aaee740ae1fff8f64c Mon Sep 17 00:00:00 2001 From: David Greaves <david@dgreaves.com> Date: Mon, 23 Dec 2013 15:46:37 +0000 Subject: [PATCH] Require -r option; Fix broken mount for $HOME in some instances Signed-off-by: David Greaves <david.greaves@jollamobile.com> --- mer-android-chroot | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mer-android-chroot b/mer-android-chroot index b6e2296..97fef0a 100755 --- a/mer-android-chroot +++ b/mer-android-chroot @@ -104,7 +104,8 @@ done shift $(($OPTIND - 1)) if [[ -z "${uburoot}" ]] ; then - uburoot=$(dirname $(readlink -f $0)) + echo "You must specify the Ubuntu rootfs using the -r option" + exit 1 else uburoot=$(readlink -f $uburoot) fi @@ -186,8 +187,11 @@ prepare_user() { if [[ $bind_mount_home == "yes" ]] ; then echo "Mounting home directory: ${HOMEDIR}" mkdir -p ${uburoot}${HOMEDIR} - echo "mount --bind ${HOMEDIR} ${uburoot}${HOMEDIR}" - mount --bind ${HOMEDIR} ${uburoot}${HOMEDIR} + # For some reason, inside an SDK, we can't remount a bound $HOME + local proot="" + { [[ -h /parentroot ]] || ! [[ -e /parentroot ]]; } || proot=/parentroot + echo "mount --bind ${proot}${HOMEDIR} ${uburoot}${HOMEDIR}" + mount --bind ${proot}${HOMEDIR} ${uburoot}${HOMEDIR} fi echo "$user ALL=NOPASSWD: ALL" > ${uburoot}/etc/sudoers.d/$user chmod 0440 ${uburoot}/etc/sudoers.d/$user -- 1.8.4.5