Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-01-20 23:20:52 +1000
committerDan McGee <dan@archlinux.org>2012-01-23 09:23:15 -0600
commitdf47136bcfd3fdec150fc8613f3fe243432d875f (patch)
tree2869b7674d5acc072306aa001f8df7de18d63dde
parentde56874cc9cdbfa96dd6360818ee6f21da3e1c86 (diff)
makepkg: fix error on unnecessary -r
The grep statement used to check for a difference between the installed package list before and after resolving dependencies returns 1 if there is no difference. This sets of the error trap when "-r" is used "unnecessarily". Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 169162ce..81e77e47 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -507,14 +507,15 @@ remove_deps() {
# check for packages removed during dependency install (e.g. due to conflicts)
# removing all installed packages is risky in this case
if [[ -n $(grep -xvFf <(printf '%s\n' "${current_packagelist[@]}") \
- <(printf '%s\n' "${original_packagelist[@]}") ) ]]; then
+ <(printf '%s\n' "${original_packagelist[@]}") || true) ]]; then
warning "$(gettext "Failed to remove installed dependencies.")"
return 0
fi
local deplist
- if ! deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \
- <(printf "%s\n" "${current_pkglist[@]}"))); then
+ deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \
+ <(printf "%s\n" "${current_pkglist[@]}") || true))
+ if [[ -n deplist ]]; then
return
fi