From owner-svn-src-user@FreeBSD.ORG Sat Jun 9 16:44:35 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2FB61065672; Sat, 9 Jun 2012 16:44:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62AF8FC14; Sat, 9 Jun 2012 16:44:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q59GiZsU043374; Sat, 9 Jun 2012 16:44:35 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q59GiZIB043372; Sat, 9 Jun 2012 16:44:35 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201206091644.q59GiZIB043372@svn.freebsd.org> From: Doug Barton Date: Sat, 9 Jun 2012 16:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236818 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 16:44:36 -0000 Author: dougb Date: Sat Jun 9 16:44:35 2012 New Revision: 236818 URL: http://svn.freebsd.org/changeset/base/236818 Log: Print the same progress update that goes to the term title in-line Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sat Jun 9 16:22:52 2012 (r236817) +++ user/dougb/portmaster/portmaster Sat Jun 9 16:44:35 2012 (r236818) @@ -2208,6 +2208,11 @@ check_fetch_only () { } term_printf () { + case "$1" in + '') [ -n "$PM_MULTI_PORTS" ] && echo -e "\n===>>> ${PM_PARENT_PORT}" ;; + *\>\>*) echo -e "\n===>>> ${PM_PARENT_PORT}${1}" ;; + esac + [ -n "$PM_NO_TERM_TITLE" ] && return case "$TERM" in cons*) return ;; esac @@ -2280,14 +2285,9 @@ update_port () { [ -n "$PM_FIRST_PASS" ] && num_of_deps=$(( $num_of_deps + 1 )) - deps=" (${dep_of_deps}/${num_of_deps})" + deps="(${dep_of_deps}/${num_of_deps})" - if [ -n "$PM_DEPTH" ]; then - echo " ${PM_DEPTH}>> ${1#$pd/}" - term_printf " ${PM_DEPTH#* }>> ${1#$pd/}${deps}" - else - [ -n "$UPDATE_ALL" ] && term_printf " >> ${1#$pd/}${deps}" - fi + term_printf " ${PM_DEPTH#* }>> ${1#$pd/} ${deps}" [ -n "$doing_dep_check" -o \( -n "$UPDATE_ALL" -a -n "$PM_FIRST_PASS" \) ] && unset NO_DEP_UPDATES @@ -2302,15 +2302,14 @@ update_port () { if [ -n "$UPDATE_ALL" ]; then term_printf " (${num_of_deps})" - echo "===>>> Returning to update check of installed ports" - echo '' + echo -e "\n===>>> Returning to update check of installed ports\n" elif [ -n "$PM_URB" ]; then return 0 elif [ -n "$PM_FIRST_PASS" -a -z "$PM_PACKAGES" ]; then echo "===>>> Continuing initial dependency check for $portdir" else term_printf " ${PM_DEPTH#* }${deps}" - echo "===>>> Returning to dependency check for $portdir" + echo -e "\n===>>> Returning to dependency check for $portdir" fi return 0 } # update_port() @@ -2527,17 +2526,15 @@ dependency_check () { safe_exit elif [ -n "$PM_FIRST_PASS" -a -z "$PM_PACKAGES" ]; then echo "===>>> Initial dependency check complete for $portdir" - case "$PM_DEPTH" in *\>\>*) echo " $PM_DEPTH" ;; esac else echo "===>>> Dependency check complete for $portdir" + local deps ; deps="(${dep_of_deps}/${num_of_deps})" case "$PM_DEPTH" in - *\>\>*) echo " $PM_DEPTH" ;; + *\>\>*) term_printf " ${PM_DEPTH#* }${deps}" ; echo '' ;; *) if [ "$PM_PARENT_PORT" = All ]; then - local deps - deps=" (${dep_of_deps}/${num_of_deps})" term_printf " >> ${upg_port:-$portdir}${deps}" else - term_printf + term_printf ; echo '' # multiport fi ;; esac fi @@ -2971,7 +2968,7 @@ all_first_pass () { check_exclude $iport || continue - PM_DEPTH= + PM_DEPTH="$iport " check_for_updates $iport $origin || fail 'Update failed' done }