From owner-svn-src-user@FreeBSD.ORG Wed Nov 3 22:21:21 2010 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 773B51065697; Wed, 3 Nov 2010 22:21:21 +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 4CEFD8FC0C; Wed, 3 Nov 2010 22:21:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oA3MLLN0035690; Wed, 3 Nov 2010 22:21:21 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA3MLLUx035688; Wed, 3 Nov 2010 22:21:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201011032221.oA3MLLUx035688@svn.freebsd.org> From: Doug Barton Date: Wed, 3 Nov 2010 22:21:21 +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: r214764 - 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: Wed, 03 Nov 2010 22:21:21 -0000 Author: dougb Date: Wed Nov 3 22:21:21 2010 New Revision: 214764 URL: http://svn.freebsd.org/changeset/base/214764 Log: Bug Fix ======= Since $build_l is no longer being incremented prior to the user's +IGNOREME decision it's no longer necessary to decrement it if the user chooses not to update that port. While I was reading the trace to find this bug I noticed that we are running update_build_l (which in turn updates PM_NEEDS_UPDATE) prior to running check_state (FORBIDDEN|DEPRECATED|BROKEN|IGNORE), so move that check up; and move the "currently installed" and "port directory" messages up as well to give context to any messages from check_state. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Wed Nov 3 22:17:42 2010 (r214763) +++ user/dougb/portmaster/portmaster Wed Nov 3 22:21:21 2010 (r214764) @@ -2947,10 +2947,8 @@ if [ -e "$pdb/$upg_port/+IGNOREME" ]; th *) CUR_DEPS="${CUR_DEPS}${upg_port}:${portdir}:" if [ ${dep_of_deps:-0} -gt 0 ]; then dep_of_deps=$(( $dep_of_deps - 1 )) - if [ -n "$PM_FIRST_PASS" ]; then + [ -n "$PM_FIRST_PASS" ] && num_of_deps=$(( $num_of_deps - 1 )) - build_l="${build_l%\\t*}" - fi fi safe_exit ;; esac @@ -2986,7 +2984,21 @@ else PM_DEPTH="${PM_DEPTH}>> ${upg_port:-$portdir} " fi +echo '' +[ "$$" -eq "$PM_PARENT_PID" -a -n "$upg_port" ] && + echo "===>>> Currently installed version: $upg_port" + +echo "===>>> Port directory: $pd/$portdir" ; echo '' + if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_ONLY" ]; then + if [ -z "$PM_INDEX_ONLY" ]; then + if ! check_state; then + echo " ===>>> If you are sure you can build it, remove the" + echo " $state line in the Makefile and try again." + safe_exit 1 + fi + fi + if [ -n "$upg_port" ]; then update_build_l $upg_port [ -n "$UPDATE_REQ_BYS" -a -n "$RESTART" -a "$$" -eq "$PM_PARENT_PID" ] && @@ -2996,20 +3008,8 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_O fi fi -echo '' -[ "$$" -eq "$PM_PARENT_PID" -a -n "$upg_port" ] && - echo "===>>> Currently installed version: $upg_port" - -echo "===>>> Port directory: $pd/$portdir" ; echo '' - # Do these things first time through if [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then - if ! check_state; then - echo " ===>>> If you are sure you can build it, remove the" - echo " $state line in the Makefile and try again." - safe_exit 1 - fi - # Do not start this in the background until we are sure we are going to build [ "$$" -eq "$PM_PARENT_PID" -a -n "$DI_FILES" ] && (read_distinfos)&