From owner-svn-src-user@FreeBSD.ORG Sat Dec 5 18:40:26 2009 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 702311065670; Sat, 5 Dec 2009 18:40:26 +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 46F738FC28; Sat, 5 Dec 2009 18:40:26 +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 nB5IeQof095507; Sat, 5 Dec 2009 18:40:26 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5IeQHI095505; Sat, 5 Dec 2009 18:40:26 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912051840.nB5IeQHI095505@svn.freebsd.org> From: Doug Barton Date: Sat, 5 Dec 2009 18:40: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: r200132 - 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, 05 Dec 2009 18:40:26 -0000 Author: dougb Date: Sat Dec 5 18:40:26 2009 New Revision: 200132 URL: http://svn.freebsd.org/changeset/base/200132 Log: If we are using --packages and/or --packages-newer and we have to build anyway we must run the 'make config' code in addition to the build dep check since a) the user might actually want to change something, and b) if using -H and there are OPTIONS the build will hang. To facilitate this turn the actual code to do 'make config' into a function Testing if an existing package is actually readable is slightly more useful than just testing if it exists. If the package does exist, and we're not using --always-fetch then return 0, both to skip the rest of the function and to make good use of the return value in the 'second chance fetch' code. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sat Dec 5 18:17:15 2009 (r200131) +++ user/dougb/portmaster/portmaster Sat Dec 5 18:40:26 2009 (r200132) @@ -1914,6 +1914,14 @@ multiport () { safe_exit } +make_config () { + config_type=config-conditional + [ -n "$FORCE_CONFIG" ] && config_type=config + [ -n "$PM_SU_VERBOSE" ] && + echo "===>>> Running 'make $config_type'" + pm_make_s $config_type +} + #=============== End functions for main =============== # INIT Parent @@ -2299,13 +2307,7 @@ if [ -n "$CONFIG_ONLY" ]; then fi fi - if [ -z "$PM_PACKAGES" ]; then - config_type=config-conditional - [ -n "$FORCE_CONFIG" ] && config_type=config - [ -n "$PM_SU_VERBOSE" ] && - echo "===>>> Running 'make $config_type'" - pm_make_s $config_type - fi + [ -z "$PM_PACKAGES" ] && make_config CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${portdir}:" @@ -2426,9 +2428,10 @@ fetch_package () { export fetch_args; } if [ -z "$PM_ALWAYS_FETCH" ]; then - if [ -e "${ppd}/${1}.tbz" ]; then + if [ -r "${ppd}/${1}.tbz" ]; then [ -n "$PM_VERBOSE" ] && echo "===>>> Package exists, skipping fetch" + return 0 else do_fetch=1 fi @@ -2579,6 +2582,8 @@ fi if [ -z "$use_package" ]; then if [ -n "$PM_PACKAGES" ]; then + make_config + if [ -z "$RECURSE_THOROUGH" ]; then echo "===>>> Starting check for build dependencies" dependency_check build-depends-list