diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-02 17:34:50 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-02 17:34:50 +0100 |
commit | 776a45ce7cd1ce8ddeebf4ec66fbdaa610af55a0 (patch) | |
tree | 654e0fb2d4ae7f32ce8d9d6eb9be20292219dfa8 /scripts/makepkg | |
parent | 37ae56e14064475cd3c95f772a21785538a93188 (diff) | |
download | pacman-776a45ce7cd1ce8ddeebf4ec66fbdaa610af55a0.tar.gz pacman-776a45ce7cd1ce8ddeebf4ec66fbdaa610af55a0.tar.xz |
* James Rosten <seinfeld90@gmail.com>
Makepkg dep removal on failure FS#5923
Diffstat (limited to 'scripts/makepkg')
-rwxr-xr-x | scripts/makepkg | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/makepkg b/scripts/makepkg index e9c53d17..778858ee 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -751,6 +751,22 @@ 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 exit 2 fi else @@ -760,6 +776,22 @@ 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 exit 2 fi fi |