1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -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)
# 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