paccache: ensure seen/seenarch vars are set

Doesn't do a whole lot of good to compare against values that are never
set. Fixes bug where -vvv output wasn't grouping packages together
properly.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
Dave Reisner 2011-10-24 10:28:35 -04:00 committed by Dan McGee
parent 8a9ce12a27
commit 24881034f6
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ summarize() {
if (( verbose >= 3 )); then
[[ $pkg =~ $pkg_re ]] && name=${BASH_REMATCH[1]} arch=${BASH_REMATCH[2]}
if [[ -z $seen || $seenarch != "$arch" || $seen != "$name" ]]; then
seen=$name seenarch=$arch
printf '%s (%s):\n' "$name" "$arch"
fi
printf ' %s\n' "$pkg"