From owner-svn-src-user@FreeBSD.ORG Sun May 1 17:26:52 2011 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 A0E121065670; Sun, 1 May 2011 17:26:52 +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 77F3B8FC12; Sun, 1 May 2011 17:26:52 +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 p41HQq1x001034; Sun, 1 May 2011 17:26:52 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41HQqLB001032; Sun, 1 May 2011 17:26:52 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105011726.p41HQqLB001032@svn.freebsd.org> From: Doug Barton Date: Sun, 1 May 2011 17:26:52 +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: r221298 - 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, 01 May 2011 17:26:52 -0000 Author: dougb Date: Sun May 1 17:26:52 2011 New Revision: 221298 URL: http://svn.freebsd.org/changeset/base/221298 Log: For -F --packages* -r handle the case where there is no +REQUIRED_BY Micro-optimize a few more cases where we can avoid going out to disk to test stuff by separating the test for a variable first. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun May 1 15:46:18 2011 (r221297) +++ user/dougb/portmaster/portmaster Sun May 1 17:26:52 2011 (r221298) @@ -332,7 +332,7 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then fi export pdb - [ -z "$port_dbdir" -a -d /var/db/ports ] && port_dbdir=/var/db/ports + [ -z "$port_dbdir" ] && [ -d /var/db/ports ] && port_dbdir=/var/db/ports [ -z "$port_dbdir" ] && port_dbdir=`pm_make_b -f/usr/share/mk/bsd.port.mk -V PORT_DBDIR 2>/dev/null` [ -n "$port_dbdir" ] && export port_dbdir @@ -3049,7 +3049,7 @@ elif [ -z "$portdir" ]; then no_valid_port fi -if [ ! -d "$pd/$portdir" -a -z "$PM_INDEX_ONLY" ]; then +if [ -z "$PM_INDEX_ONLY" ] && [ ! -d "$pd/$portdir" ]; then find_moved_port $portdir $upg_port || no_valid_port [ -n "$moved_npd" ] || no_valid_port [ -d "$pd/$moved_npd" ] || no_valid_port @@ -3640,8 +3640,12 @@ if [ -z "$PM_THOROUGH" -a -z "$NO_DEP_UP fi if [ -n "$FETCH_ONLY" ]; then # Only reached here if using packages - if [ -n "$UPDATE_REQ_BYS" ] && [ -s "$pdb/$new_port/+REQUIRED_BY" ]; then - urb_final + if [ -n "$UPDATE_REQ_BYS" ]; then + if [ -s "$pdb/$new_port/+REQUIRED_BY" ]; then + urb_final + else + safe_exit + fi elif [ "$$" -eq "$PM_PARENT_PID" ]; then check_fetch_only Package else @@ -3695,7 +3699,7 @@ echo '' # Remove saved libs that match newly installed files temp=`find $LOCALBASE_COMPAT -type d -empty 2>/dev/null` -if [ -z "$temp" -a -d "$LOCALBASE_COMPAT" ]; then +if [ -z "$temp" ] && [ -d "$LOCALBASE_COMPAT" ]; then unset files for file in `pkg_info -q -L $new_port`; do [ -f "${LOCALBASE_COMPAT}/${file##*/}" ] && @@ -3824,7 +3828,6 @@ if [ -n "$upg_port" ]; then else ilist="Re-installation of $upg_port" fi - unset argv else ilist="Installation of $portdir ($new_port)" fi