mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
makepkg: avoid using comm for diff'ing package lists
Whereas comm will check inputs to see if they're sorted (and warn when they aren't), grep doesn't even care about ordering. In this particular instance -- neither do we. We're only interested that the two lists are equivalent. Fixes FS#26580. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
15aa57d51b
commit
a521cea96f
@ -506,15 +506,17 @@ 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 $(comm -23 <(printf "%s\n" "${original_pkglist[@]}") \
|
||||
<(printf "%s\n" "${current_pkglist[@]}")) ]]; then
|
||||
warning "$(gettext "Failed to remove installed dependencies.")"
|
||||
return 0
|
||||
if [[ -n $(grep -xvFf <(printf '%s\n' "${current_packagelist[@]}") \
|
||||
<(printf '%s\n' "${original_packagelist[@]}") ) ]]; then
|
||||
warning "$(gettext "Failed to remove installed dependencies.")"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local deplist=($(comm -13 <(printf "%s\n" "${original_pkglist[@]}") \
|
||||
<(printf "%s\n" "${current_pkglist[@]}")))
|
||||
(( ${#deplist[@]} == 0 )) && return
|
||||
local deplist
|
||||
if ! deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \
|
||||
<(printf "%s\n" "${current_pkglist[@]}"))); then
|
||||
return
|
||||
fi
|
||||
|
||||
msg "Removing installed dependencies..."
|
||||
# exit cleanly on failure to remove deps as package has been built successfully
|
||||
|
Loading…
x
Reference in New Issue
Block a user