From owner-svn-src-user@FreeBSD.ORG Sun Jul 22 09:04:27 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40BF8106566B; Sun, 22 Jul 2012 09:04:27 +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 2C5E88FC08; Sun, 22 Jul 2012 09:04:27 +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 q6M94Rqk060051; Sun, 22 Jul 2012 09:04:27 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6M94QZk060049; Sun, 22 Jul 2012 09:04:26 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207220904.q6M94QZk060049@svn.freebsd.org> From: Doug Barton Date: Sun, 22 Jul 2012 09:04:26 +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: r238681 - 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: Sun, 22 Jul 2012 09:04:27 -0000 Author: dougb Date: Sun Jul 22 09:04:26 2012 New Revision: 238681 URL: http://svn.freebsd.org/changeset/base/238681 Log: Simplify update_build_l(). Nowadays when we call it we always know the origin, and if the port is installed we don't need to search for either Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Jul 22 07:52:58 2012 (r238680) +++ user/dougb/portmaster/portmaster Sun Jul 22 09:04:26 2012 (r238681) @@ -2292,26 +2292,21 @@ update_pm_nu () { update_build_l () { local origin iport new_port - case "$1" in - */*) origin=$1 - update_pm_nu $origin - [ -n "$PM_NO_CONFIRM" ] && return - case "$build_l" in *\ $origin\\*) return ;; esac - iport=`iport_from_origin $origin` - if [ -z "$iport" ]; then - build_l="${build_l}\tInstall $origin\n" - return - fi ;; - *) iport=$1 - origin=`origin_from_pdb $1` - update_pm_nu $origin - case "$build_l" in *\ $iport\ *|*\ $iport\\*) return ;; esac ;; - esac + origin=$1 ; update_pm_nu $origin [ -n "$PM_NO_CONFIRM" ] && return - if [ -z "$PM_INDEX_ONLY" ]; then - pm_cd $pd/$origin && new_port=`pm_make -V PKGNAME` + if [ -z "$2" ]; then + case "$build_l" in *\ $origin\\*) return ;; esac + build_l="${build_l}\tInstall $origin\n" + return + else + iport=$2 + case "$build_l" in *\ $iport\ *|*\ $iport\\*) return ;; esac + fi + + if pm_cd_pd $origin; then + new_port=`pm_make -V PKGNAME` else new_port=`parse_index $origin name` || fail "No entry for $origin in $PM_INDEX" @@ -3291,11 +3286,7 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_O fi fi - if [ -n "$upg_port" ]; then - update_build_l $upg_port - else - update_build_l $portdir - fi + update_build_l $portdir $upg_port elif [ -n "$FETCH_ONLY" -a -n "$PM_PACKAGES" ]; then update_pm_nu $portdir fi