From owner-svn-src-user@FreeBSD.ORG Wed Aug 11 06:22:20 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 07E5A1065672; Wed, 11 Aug 2010 06:22:20 +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 EC8A28FC3A; Wed, 11 Aug 2010 06:22:19 +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 o7B6MJDs062774; Wed, 11 Aug 2010 06:22:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7B6MJqf062773; Wed, 11 Aug 2010 06:22:19 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201008110622.o7B6MJqf062773@svn.freebsd.org> From: Doug Barton Date: Wed, 11 Aug 2010 06:22:19 +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: r211164 - 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, 11 Aug 2010 06:22:20 -0000 Author: dougb Date: Wed Aug 11 06:22:18 2010 New Revision: 211164 URL: http://svn.freebsd.org/changeset/base/211164 Log: After staring at this for so long during the whitespace cleanup I can't believe I didn't see this one. 99% non-functional except moving an echo '' up to where it should have been (the output to the user is the same). Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Wed Aug 11 05:35:41 2010 (r211163) +++ user/dougb/portmaster/portmaster Wed Aug 11 06:22:18 2010 (r211164) @@ -2967,74 +2967,72 @@ echo '' [ "$$" -eq "$PM_PARENT_PID" -a -n "$upg_port" ] && echo "===>>> Currently installed version: $upg_port" -if [ -z "$PM_INDEX_ONLY" ]; then - echo "===>>> Port directory: $pd/$portdir" +echo "===>>> Port directory: $pd/$portdir" ; echo '' - # Do these things first time through - if [ -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" ] && { echo ''; (read_distinfos)& } - - # Handle the problem of manual fetching - [ -z "$PM_PACKAGES" ] && master_sites=`pm_make_b -V MASTER_SITES` - - if [ -n "$master_sites" ]; then - # PATCHFILES may get added after the first pass, but we want to - # do as much of this as we can, as early as we can, and - # patch files are usually small anyway. - distfiles=`pm_make -V ALLFILES | sed -e 's# *$##g'` - [ -n "$distfiles" ] && distfiles=" ${distfiles} " - - # Make sure that different ports using the same distfiles - # do not clobber each other's fetchs - for file in $distfiles; do - case "$file" in */*) file=`echo $file | sed s#/#_#g` ;; esac - if ! ls ${TMPDIR}/f-${PM_PARENT_PID}-${file}-* >/dev/null 2>&1; then - pm_mktemp ${file}-${portdir#*/} >/dev/null - else - DONT_FETCH=dont_fetch - break - fi - done - - if [ -z "$DONT_FETCH" -a -n "$distfiles" ]; then - echo "===>>> Launching 'make checksum' for $portdir in background" - fetchlog=`pm_mktemp fetchlog-${portdir#*/}` - (pm_make -DBATCH checksum >> $fetchlog 2>&1 && { - rm -f ${TMPDIR}/f-${PM_PARENT_PID}-*-${portdir#*/}.*; exit 0; } - allfiles=`pm_make -V ALLFILES` - pm_make delete-distfiles RESTRICTED_FILES="${allfiles}" \ - >> $fetchlog 2>&1 && - echo "===>>> RE-STARTING FETCH <<<===" >> $fetchlog - pm_make -DBATCH checksum >> $fetchlog 2>&1 - rm -f ${TMPDIR}/f-${PM_PARENT_PID}-*-${portdir#*/}.* )& +# 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)& + + # Handle the problem of manual fetching + [ -z "$PM_PACKAGES" ] && master_sites=`pm_make_b -V MASTER_SITES` + + if [ -n "$master_sites" ]; then + # PATCHFILES may get added after the first pass, but we want to + # do as much of this as we can, as early as we can, and + # patch files are usually small anyway. + distfiles=`pm_make -V ALLFILES | sed -e 's# *$##g'` + [ -n "$distfiles" ] && distfiles=" ${distfiles} " + + # Make sure that different ports using the same distfiles + # do not clobber each other's fetchs + for file in $distfiles; do + case "$file" in */*) file=`echo $file | sed s#/#_#g` ;; esac + if ! ls ${TMPDIR}/f-${PM_PARENT_PID}-${file}-* >/dev/null 2>&1; then + pm_mktemp ${file}-${portdir#*/} >/dev/null + else + DONT_FETCH=dont_fetch + break fi - unset master_sites distfiles file DONT_FETCH fetchlog allfiles - fi + done - if [ -z "$FETCH_ONLY" -a ! "$PM_PACKAGES" = only ]; then - TESTINT=`grep -l ^IS_INTERACTIVE Makefile` - else - [ -n "$ALL_FETCH" ] && safe_exit - fi - if [ -n "$TESTINT" ]; then - echo '' - echo "===>>> Warning: $portdir is interactive, and will likely" - echo " require attention during the build" - echo '' - echo -n "===>>> Press the [Enter] or [Return] key to continue " - read DISCARD - echo '' - unset TESTINT DISCARD - fi - fi # [ -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ] -fi # [ -z "$PM_INDEX_ONLY" ] + if [ -z "$DONT_FETCH" -a -n "$distfiles" ]; then + echo "===>>> Launching 'make checksum' for $portdir in background" + fetchlog=`pm_mktemp fetchlog-${portdir#*/}` + (pm_make -DBATCH checksum >> $fetchlog 2>&1 && { + rm -f ${TMPDIR}/f-${PM_PARENT_PID}-*-${portdir#*/}.*; exit 0; } + allfiles=`pm_make -V ALLFILES` + pm_make delete-distfiles RESTRICTED_FILES="${allfiles}" \ + >> $fetchlog 2>&1 && + echo "===>>> RE-STARTING FETCH <<<===" >> $fetchlog + pm_make -DBATCH checksum >> $fetchlog 2>&1 + rm -f ${TMPDIR}/f-${PM_PARENT_PID}-*-${portdir#*/}.* )& + fi + unset master_sites distfiles file DONT_FETCH fetchlog allfiles + fi + + if [ -z "$FETCH_ONLY" -a ! "$PM_PACKAGES" = only ]; then + TESTINT=`grep -l ^IS_INTERACTIVE Makefile` + else + [ -n "$ALL_FETCH" ] && safe_exit + fi + if [ -n "$TESTINT" ]; then + echo '' + echo "===>>> Warning: $portdir is interactive, and will likely" + echo " require attention during the build" + echo '' + echo -n "===>>> Press the [Enter] or [Return] key to continue " + read DISCARD + echo '' + unset TESTINT DISCARD + fi +fi # [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ] if [ -n "$PM_FIRST_PASS" ]; then [ "$$" -eq "$PM_PARENT_PID" -a -n "$PM_BUILD_ONLY_LIST" ] &&