svn commit: r236883 - user/dougb/portmaster
Doug Barton
dougb at FreeBSD.org
Mon Jun 11 08:52:21 UTC 2012
Author: dougb
Date: Mon Jun 11 08:52:21 2012
New Revision: 236883
URL: http://svn.freebsd.org/changeset/base/236883
Log:
In multiport(), count the number of ports in worklist_tmp, then use that
for the first progress update. The number might get revised due to the
user opting out of an update that matches a glob pattern, but it's better
than doing 1/1, 2/2, etc. in the first pass.
Modified:
user/dougb/portmaster/portmaster
Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster Mon Jun 11 08:42:11 2012 (r236882)
+++ user/dougb/portmaster/portmaster Mon Jun 11 08:52:21 2012 (r236883)
@@ -2730,6 +2730,7 @@ multiport () {
esac
done
+ numports=0
for port in $worklist_temp; do
check_exclude $port || continue
check_interactive $port || continue
@@ -2753,6 +2754,8 @@ multiport () {
fi
fi
+ numports=$(( $numports + 1 ))
+
worklist="$worklist $port"
portlist="${portlist}\t${port}\n"
PM_MULTI_PORTS="${PM_MULTI_PORTS}${port}:"
@@ -2784,7 +2787,7 @@ multiport () {
[ -n "$PM_URB" ] && export PM_URB
- numports=0
+ num=0
for port in $worklist; do
case "$port" in
*/*) origin=$port ;;
@@ -2793,8 +2796,8 @@ multiport () {
case "$PM_NEEDS_UPDATE" in *\ $origin\ *) continue ;; esac
- numports=$(( $numports + 1 ))
- init_term_printf "$port ${numports}/${numports}"
+ num=$(( $num + 1 ))
+ init_term_printf "$port ${num}/${numports}"
($0 $ARGS $port) || update_failed=update_failed
. $IPC_SAVE
[ -n "$update_failed" ] && fail "Update for $port failed"
More information about the svn-src-user
mailing list