mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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>
This commit is contained in:
parent
aa48be7223
commit
dd5bc808ea
@ -3,7 +3,7 @@
|
|||||||
# makepkg - make packages compatable for use with pacman
|
# makepkg - make packages compatable for use with pacman
|
||||||
# @configure_input@
|
# @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) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
# Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
# Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
# Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
# Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@ -363,12 +363,13 @@ handledeps() {
|
|||||||
|
|
||||||
local makepkg_opts='-i -c -b'
|
local makepkg_opts='-i -c -b'
|
||||||
[ "$RMDEPS" = "1" ] && makepkg_opts="$makepkg_opts -r"
|
[ "$RMDEPS" = "1" ] && makepkg_opts="$makepkg_opts -r"
|
||||||
|
[ "$ASROOT" = "1" ] && makepkg_opts="$makepkg_opts --asroot"
|
||||||
local ret packagedir
|
local ret packagedir
|
||||||
for packagedir in $candidates; do
|
for packagedir in $candidates; do
|
||||||
if [ -f "$packagedir/$BUILDSCRIPT" ]; then
|
if [ -f "$packagedir/$BUILDSCRIPT" ]; then
|
||||||
cd "$packagedir"
|
cd "$packagedir"
|
||||||
ret=0
|
ret=0
|
||||||
PKGDEST="$PKGDEST" makepkg $makepkg_opts || ret=$?
|
PKGDEST="$PKGDEST" makepkg $makepkg_opts $PACMAN_OPTS || ret=$?
|
||||||
[ $ret -eq 0 ] && continue 2
|
[ $ret -eq 0 ] && continue 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -1425,6 +1426,7 @@ else
|
|||||||
rm -rf "$pkgdir"
|
rm -rf "$pkgdir"
|
||||||
fi
|
fi
|
||||||
mkdir -p "$pkgdir"
|
mkdir -p "$pkgdir"
|
||||||
|
cd "$startdir"
|
||||||
|
|
||||||
if [ $EUID -eq 0 ]; then
|
if [ $EUID -eq 0 ]; then
|
||||||
# if we are root, then we don't need to recall makepkg with fakeroot
|
# if we are root, then we don't need to recall makepkg with fakeroot
|
||||||
@ -1439,7 +1441,6 @@ else
|
|||||||
create_package
|
create_package
|
||||||
else
|
else
|
||||||
msg "$(gettext "Entering fakeroot environment...")"
|
msg "$(gettext "Entering fakeroot environment...")"
|
||||||
cd "$startdir"
|
|
||||||
|
|
||||||
if [ "$newpkgver" != "" ]; then
|
if [ "$newpkgver" != "" ]; then
|
||||||
fakeroot -- $0 --forcever $newpkgver -F $ARGLIST || exit $?
|
fakeroot -- $0 --forcever $newpkgver -F $ARGLIST || exit $?
|
||||||
|
Loading…
Reference in New Issue
Block a user