diff options
author | Dan McGee <dan@archlinux.org> | 2008-01-08 09:10:45 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-08 09:15:30 -0600 |
commit | dd5bc808ea513ff0a6131ec3e75b02fb138302c5 (patch) | |
tree | 29ac1ee85ef3985d045834251126470d5faacd91 | |
parent | aa48be72235edc7245f1099ae0f7fc2ff4c71f7f (diff) |
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 <karolina.lindqvist@kramnet.se>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | scripts/makepkg.sh.in | 7 |
1 files 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 <jvinet@zeroflux.org> +# Copyright (c) 2002-2008 by Judd Vinet <jvinet@zeroflux.org> # Copyright (c) 2005 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org> # Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu> @@ -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 $? |