From dd5bc808ea513ff0a6131ec3e75b02fb138302c5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 8 Jan 2008 09:10:45 -0600 Subject: makepkg: Fix issues with --asroot and building dependencies The --asroot option was not passed to recursive calls of makepkg. In addition, a 'cd' call was done only on the fakeroot branch instead of both fakeroot and root branches. Move it outside the conditional. Noticed-by: Karolina Lindqvist Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 0b31485d..5dbfb880 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -3,7 +3,7 @@ # makepkg - make packages compatable for use with pacman # @configure_input@ # -# Copyright (c) 2002-2007 by Judd Vinet +# Copyright (c) 2002-2008 by Judd Vinet # Copyright (c) 2005 by Aurelien Foret # Copyright (c) 2006 by Miklos Vajna # Copyright (c) 2005 by Christian Hamar @@ -363,12 +363,13 @@ handledeps() { local makepkg_opts='-i -c -b' [ "$RMDEPS" = "1" ] && makepkg_opts="$makepkg_opts -r" + [ "$ASROOT" = "1" ] && makepkg_opts="$makepkg_opts --asroot" local ret packagedir for packagedir in $candidates; do if [ -f "$packagedir/$BUILDSCRIPT" ]; then cd "$packagedir" ret=0 - PKGDEST="$PKGDEST" makepkg $makepkg_opts || ret=$? + PKGDEST="$PKGDEST" makepkg $makepkg_opts $PACMAN_OPTS || ret=$? [ $ret -eq 0 ] && continue 2 fi done @@ -1425,6 +1426,7 @@ else rm -rf "$pkgdir" fi mkdir -p "$pkgdir" + cd "$startdir" if [ $EUID -eq 0 ]; then # if we are root, then we don't need to recall makepkg with fakeroot @@ -1439,7 +1441,6 @@ else create_package else msg "$(gettext "Entering fakeroot environment...")" - cd "$startdir" if [ "$newpkgver" != "" ]; then fakeroot -- $0 --forcever $newpkgver -F $ARGLIST || exit $? -- cgit v1.2.3-70-g09d2