1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-08 12:28:00 -05:00

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>
This commit is contained in:
Allan McRae 2012-01-20 23:20:52 +10:00 committed by Dan McGee
parent de56874cc9
commit df47136bcf

View File

@ -507,14 +507,15 @@ remove_deps() {
# check for packages removed during dependency install (e.g. due to conflicts) # check for packages removed during dependency install (e.g. due to conflicts)
# removing all installed packages is risky in this case # removing all installed packages is risky in this case
if [[ -n $(grep -xvFf <(printf '%s\n' "${current_packagelist[@]}") \ 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.")" warning "$(gettext "Failed to remove installed dependencies.")"
return 0 return 0
fi fi
local deplist local deplist
if ! deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \ deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \
<(printf "%s\n" "${current_pkglist[@]}"))); then <(printf "%s\n" "${current_pkglist[@]}") || true))
if [[ -n deplist ]]; then
return return
fi fi