diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-17 04:54:55 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-17 04:54:55 +0000 |
commit | 31e0561865674f8cd56e3ed8131393a732ffcbac (patch) | |
tree | ca31e18beabac6b6d787d148aa54ce3d33f0f87b /scripts | |
parent | 803f92b6a661f20db39263657f8726f54666960a (diff) | |
download | pacman-31e0561865674f8cd56e3ed8131393a732ffcbac.tar.xz |
Roman Kyrylych <Roman.Kyrylych@gmail.com>
* dependency removal fixes and refactoring
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/makepkg | 71 |
1 files changed, 24 insertions, 47 deletions
diff --git a/scripts/makepkg b/scripts/makepkg index 778858ee..0401c48d 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -255,6 +255,27 @@ handledeps() { return $missingdeps } +# fix flyspray bug #5923 +removedeps() { + if [ "$RMDEPS" = "1" -a "$EUID" = "0" -a "$INFAKEROOT" != "1" -a \( ! -z "$deplist" -o ! -z "$makedeplist" \) ]; then + msg "Removing installed dependencies..." + pacman3 $PACMAN_OPTS -R $makedeplist $deplist + # fixes bug #6215 + elif [ "$RMDEPS" = "1" -a "$DEP_SUDO" = "1" -a \( ! -z "$deplist" -o ! -z "$makedeplist" \) ]; then + msg "Removing installed dependencies..." + if [ "$INFAKEROOT" = "1" ]; then + export FAKEROOTKEY2=$FAKEROOTKEY + unset $FAKEROOTKEY + fi + sudo pacman3 $PACMAN_OPTS -R $makedeplist $deplist + if [ "$INFAKEROOT" = "1" ]; then + export FAKEROOTKEY=$FAKEROOTKEY2 + unset $FAKEROOTKEY2 + fi + fi +} + + usage() { echo "makepkg version $myver" echo @@ -751,22 +772,7 @@ else if [ ${PIPESTATUS[0]} -gt 0 ]; then error "Build Failed. Aborting..." - # fix flyspray bug #5923 - if [ "$RMDEPS" = "1" -a "$EUID" = "0" -a "$INFAKEROOT" != "1" -a \( ! -z "$deplist" -o ! -z "$makedeplist" \) ]; then - msg "Removing installed dependencies..." - pacman $PACMAN_OPTS -R $makedeplist $deplist - elif [ "$RMDEPS" = "1" -a "$DEP_SUDO" = "1" ]; then - msg "Removing installed dependencies..." - if [ "$INFAKEROOT" = "1" ]; then - export FAKEROOTKEY2=$FAKEROOTKEY - unset $FAKEROOTKEY - fi - sudo pacman $PACMAN_OPTS -R $makedeplist $deplist - if [ "$INFAKEROOT" = "1" ]; then - export FAKEROOTKEY=$FAKEROOTKEY2 - unset $FAKEROOTKEY2 - fi - fi + removedeps exit 2 fi else @@ -776,22 +782,7 @@ else [ $set_e -eq 1 ] && set +e if [ $? -gt 0 ]; then error "Build Failed. Aborting..." - # fix flyspray bug #5923 - if [ "$RMDEPS" = "1" -a "$EUID" = "0" -a "$INFAKEROOT" != "1" -a \( ! -z "$deplist" -o ! -z "$makedeplist" \) ]; then - msg "Removing installed dependencies..." - pacman $PACMAN_OPTS -R $makedeplist $deplist - elif [ "$RMDEPS" = "1" -a "$DEP_SUDO" = "1" ]; then - msg "Removing installed dependencies..." - if [ "$INFAKEROOT" = "1" ]; then - export FAKEROOTKEY2=$FAKEROOTKEY - unset $FAKEROOTKEY - fi - sudo pacman $PACMAN_OPTS -R $makedeplist $deplist - if [ "$INFAKEROOT" = "1" ]; then - export FAKEROOTKEY=$FAKEROOTKEY2 - unset $FAKEROOTKEY2 - fi - fi + removedeps exit 2 fi fi @@ -932,21 +923,7 @@ if [ "$CLEANUP" = "1" ]; then rm -rf ${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log* fi -if [ "$RMDEPS" = "1" -a "$EUID" = "0" -a "$INFAKEROOT" != "1" -a \( ! -z "$deplist" -o ! -z "$makedeplist" \) ]; then - msg "Removing installed dependencies..." - pacman $PACMAN_OPTS -R $makedeplist $deplist -elif [ "$RMDEPS" = "1" -a "$DEP_SUDO" = "1" ]; then - msg "Removing installed dependencies..." - if [ "$INFAKEROOT" = "1" ]; then - FAKEROOTKEY2=$FAKEROOTKEY - unset FAKEROOTKEY - fi - sudo pacman $PACMAN_OPTS -R $makedeplist $deplist - if [ "$INFAKEROOT" = "1" ]; then - export FAKEROOTKEY=$FAKEROOTKEY2 - unset FAKEROOTKEY2 - fi -fi +removedeps msg "Finished making: $pkgname ($(date))" |