From 70e1601042250b395659f4c325ae7a73cbe238ab Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Dec 2012 22:42:41 -0500 Subject: libremakepkg: learn '-C' to dissable using the chroot --- src/chroot-tools/libremakepkg.gpl2 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/chroot-tools/libremakepkg.gpl2') diff --git a/src/chroot-tools/libremakepkg.gpl2 b/src/chroot-tools/libremakepkg.gpl2 index fd58d50..9c600ed 100755 --- a/src/chroot-tools/libremakepkg.gpl2 +++ b/src/chroot-tools/libremakepkg.gpl2 @@ -36,6 +36,11 @@ EOF } chroot_extract() { + if $NOCHROOT; then + chcleanup + sudo -u ${LIBREUSER} ${MAKEPKG} ${makepkg_args} -o + return + fi rm -rf "$copydir"/build/* cp PKGBUILD "$copydir/build/" ( @@ -72,14 +77,19 @@ chroot_extract() { } chroot_build() { - chroot_exec -N "sudo -u nobody ${MAKEPKG} ${makepkg_args} -e" + local user=$LIBREUSER + $NOCHROOT || user=nobody + chroot_exec -N "sudo -u ${user} ${MAKEPKG} ${makepkg_args} -e" } chroot_exec() { local flags='' [[ $1 == -N ]] && { flags=$1; shift; } local cmd="$*" - cat >"$copydir/chrootexec" <"$copydir/chrootexec" <