From: Valentin Vidic Date: Fri, 7 Mar 2008 13:10:16 +0000 (+0100) Subject: Fixed bloat list size. X-Git-Tag: debian/4.0.1~30 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=59888b246232e73ee4f9995f3a9a3f57b128c9b5;p=carnet-upgrade.git Fixed bloat list size. --- diff --git a/src/functions.sh b/src/functions.sh index 7b9eae4..40378f9 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -134,6 +134,7 @@ remove_bloat() { text="$msg_remove_bloat" [ "$DEBUG" ] && set -x + n=0 pkglist=$(mktemp /var/lib/carnet-upgrade/pkglist.XXXXXX) COLUMNS=200 dpkg -l | awk '$1 ~ /^.i/ { print $2 }' > $pkglist for i in $(echo "$bloats" | sed 's/ */ /g'| awk -F' ' '{print $2}') @@ -143,13 +144,15 @@ remove_bloat() { add_this="$(echo "$bloats" | egrep " .*\b${i}\b" | sed 's/ */ /g'| awk -F' ' '{print $1}')" if ! echo "$to_show" | grep -q "$add_this"; then to_show="$to_show \"$add_this\" \"\" on" + n=$(($n+1)) fi fi done [ "$DEBUG" ] || rm -f $pkglist [ -z "$to_show" ] && return 0 + test $n -gt 8 && n=8 tmpfile=$(mktemp /var/lib/carnet-upgrade/dialog-tmp.XXXXXX) - cmd="dialog --nocancel --backtitle \""$title"\" --checklist \""$text"\" 20 75 8 $to_show" + cmd="dialog --nocancel --backtitle \""$title"\" --checklist \""$text"\" 20 75 $n $to_show" [ "$DEBUG" ] && set +x eval $cmd 2> $tmpfile [ "$DEBUG" ] && set -x