Date: Sun, 31 Oct 2010 01:44:40 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r214580 - user/dougb/portmaster Message-ID: <201010310144.o9V1ieN1037057@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Sun Oct 31 01:44:40 2010 New Revision: 214580 URL: http://svn.freebsd.org/changeset/base/214580 Log: Don't call update_build_l() (which also updates PM_NEEDS_UPDATE) in multiport() or update_port(), instead always call it from the main routine, which occurs after the user has made a decision about any +IGNOREME files that might be present. (Also simplifies a bit.) Related to the above, in multiport() if the child returns and the port in question is not in PM_NEEDS_UPDATE (usually/[only?] because there is an +IGNOREME and they chose not to proceed) then add the port to PM_MULTI_BUILT and decrement $num_ports so that it will be ignored in the build phase. In post_first_pass() return if PM_NEEDS_UPDATE is empty. This is a micro-op in the common case, but allows us to give the right message to the user in the -a case where the only port that needs updating has an +IGNOREME file, and the user chose not to proceed. For -a add some whitespace around the "all ports are up to date" Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Oct 31 00:51:22 2010 (r214579) +++ user/dougb/portmaster/portmaster Sun Oct 31 01:44:40 2010 (r214580) @@ -2148,10 +2148,7 @@ update_port () { dep_of_deps=$(( $dep_of_deps + 1 )) - if [ -n "$PM_FIRST_PASS" ]; then - num_of_deps=$(( $num_of_deps + 1 )) - update_build_l $1 - fi + [ -n "$PM_FIRST_PASS" ] && num_of_deps=$(( $num_of_deps + 1 )) deps=" (${dep_of_deps}/${num_of_deps})" @@ -2464,6 +2461,7 @@ post_first_pass () { fi PM_NEEDS_UPDATE=${PM_NEEDS_UPDATE# } + [ -z "$PM_NEEDS_UPDATE" ] && return action=build if [ "$PM_PACKAGES" = only ]; then @@ -2587,7 +2585,13 @@ multiport () { init_term_printf "$port ${numports}/${numports}" ($0 $ARGS $port) || fail "Update for $port failed" . $IPC_SAVE - update_build_l $port + + case "$PM_NEEDS_UPDATE" in + *\ ${origin}\ *) continue ;; + # Handle +IGNOREME in child + *) PM_MULTI_BUILT="${PM_MULTI_BUILT}${port}:" + numports=$(( $numports - 1 )) ;; + esac done check_fetch_only @@ -2807,7 +2811,7 @@ all_first_pass () { check_fetch_only if [ -n "$NO_DEP_UPDATES" ]; then - echo "===>>> All ports are up to date" + echo '' ; echo "===>>> All ports are up to date" ; echo '' safe_exit fi @@ -2969,10 +2973,11 @@ else PM_DEPTH="${PM_DEPTH}>> ${upg_port:-$portdir} " fi -if [ -n "$PM_FIRST_PASS" -a "$$" -eq "$PM_PARENT_PID" ]; then +if [ -n "$PM_FIRST_PASS" ]; then if [ -n "$upg_port" ]; then update_build_l $upg_port - [ -n "$UPDATE_REQ_BYS" -a -n "$RESTART" ] && check_for_updates $upg_port + [ -n "$UPDATE_REQ_BYS" -a -n "$RESTART" -a "$$" -eq "$PM_PARENT_PID" ] && + check_for_updates $upg_port else update_build_l $portdir fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010310144.o9V1ieN1037057>