Date: Tue, 2 Nov 2010 22:06:23 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r214689 - user/dougb/portmaster Message-ID: <201011022206.oA2M6NAm092150@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Tue Nov 2 22:06:23 2010 New Revision: 214689 URL: http://svn.freebsd.org/changeset/base/214689 Log: Since we're going to depend on PM_NEEDS_UPDATE to tell us what ports we can skip with -a anyway, use the same mechanism to handle multiport(). This allows me to get rid of yet another list, PM_MULTI_BUILT. While I'm here, tune up all the examples of case "$PM_NEEDS_UPDATE" to have a consistent style. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Tue Nov 2 21:01:18 2010 (r214688) +++ user/dougb/portmaster/portmaster Tue Nov 2 22:06:23 2010 (r214689) @@ -253,7 +253,6 @@ safe_exit () { echo "dep_of_deps='$dep_of_deps'" >> $IPC_SAVE echo "PM_NEEDS_UPDATE='$PM_NEEDS_UPDATE'" >> $IPC_SAVE [ -z "$NO_BACKUP" -a -z "$BACKUP" ] && echo "NB_DELETE='$NB_DELETE'" >> $IPC_SAVE - [ -n "$PM_MULTI_BUILT" ] && echo "PM_MULTI_BUILT='$PM_MULTI_BUILT'" >> $IPC_SAVE if [ -n "$INTERACTIVE_UPDATE" ]; then echo "INTERACTIVE_YES='$INTERACTIVE_YES'" >> $IPC_SAVE echo "INTERACTIVE_NO='$INTERACTIVE_NO'" >> $IPC_SAVE @@ -2525,8 +2524,7 @@ init_term_printf () { multiport () { # Global - PM_MULTI_PORTS=':' ; PM_MULTI_BUILT=':' - export PM_MULTI_PORTS PM_MULTI_BUILT + PM_MULTI_PORTS=':' ; export PM_MULTI_PORTS local port worklist_temp worklist portlist numports origin num @@ -2586,7 +2584,7 @@ multiport () { *) origin=`origin_from_pdb $port` ;; esac - case "$PM_NEEDS_UPDATE" in *\ ${origin}\ *) continue ;; esac + case "$PM_NEEDS_UPDATE" in *\ $origin\ *) continue ;; esac numports=$(( $numports + 1 )) init_term_printf "$port ${numports}/${numports}" @@ -2594,10 +2592,9 @@ multiport () { . $IPC_SAVE case "$PM_NEEDS_UPDATE" in - *\ ${origin}\ *) continue ;; + *\ $origin\ *) continue ;; # Handle +IGNOREME in child - *) PM_MULTI_BUILT="${PM_MULTI_BUILT}${port}:" - numports=$(( $numports - 1 )) ;; + *) numports=$(( $numports - 1 )) ;; esac done @@ -2608,10 +2605,11 @@ multiport () { export PM_BUILDING=pmbuildingmultiport num=0 for port in $worklist; do - case "$PM_MULTI_BUILT" in *:${port}:*) continue ;; esac - case "$port" in - */*) ;; # Ok to proceed + */*) case "$PM_NEEDS_UPDATE" in + *\ $port\ *) ;; # Ok to proceed + *) continue ;; # Already updated as a dependency + esac ;; *) # If an installed version does not exist at this # point it probably got updated as a dependency if [ ! -d "$pdb/$port" ]; then @@ -2837,7 +2835,7 @@ all_first_pass () { for origin in $PM_NEEDS_UPDATE; do case "$PM_NEEDS_UPDATE" in *\ $origin\ *) update_port $origin ;; - '') continue ;; # Already updated as a dependency + *) continue ;; # Already updated as a dependency esac done @@ -3661,8 +3659,6 @@ if [ "$$" -ne "$PM_PARENT_PID" -o -n "$U echo "===>>> $ilist succeeded" ; echo '' fi -[ -n "$PM_MULTI_BUILT" ] && PM_MULTI_BUILT="${PM_MULTI_BUILT}${new_port}:${portdir}:" - INSTALLED_LIST="${INSTALLED_LIST}\t${ilist}\n" [ -e "$pdb/$new_port/+DISPLAY" ] && DISPLAY_LIST="${DISPLAY_LIST}$new_port " CUR_DEPS="${CUR_DEPS}${new_port}:${portdir}:"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011022206.oA2M6NAm092150>