Date: Sun, 6 Dec 2009 21:42:25 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r200187 - user/dougb/portmaster Message-ID: <200912062142.nB6LgPSI032444@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Sun Dec 6 21:42:25 2009 New Revision: 200187 URL: http://svn.freebsd.org/changeset/base/200187 Log: Rather than repeat all the tests for when NOT to run read_distinfos() each time, depend on the tests for creating $DI_FILES then test for its existence. In fetch_packages() don't run all the code for finding out packages, etc. unless $ppd is actually unset. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Dec 6 21:07:47 2009 (r200186) +++ user/dougb/portmaster/portmaster Sun Dec 6 21:42:25 2009 (r200187) @@ -2019,10 +2019,8 @@ all_config () { CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${origin}:" done } - if [ -z "$DONT_SCRUB_DISTFILES" -a -z "$FETCH_ONLY" \ - -a -z "$PM_PACKAGES" ]; then - (read_distinfos)& - fi + [ -n "$DI_FILES" ] && (read_distinfos)& + ports_by_category echo "===>>> Starting check of installed ports for available updates" @@ -2236,10 +2234,8 @@ check_state || { safe_exit 1; } # Do not start this in the background until we are sure we are going to build -if [ "$$" -eq "$PM_PARENT_PID" -a -z "$SHOW_WORK" -a -z "$PM_PACKAGES" \ - -a -z "$DONT_SCRUB_DISTFILES" -a -z "$FETCH_ONLY" ]; then - echo ''; (read_distinfos)& -fi +[ "$$" -eq "$PM_PARENT_PID" -a -n "$DI_FILES" ] && { + echo ''; (read_distinfos)& } # Do these things first time through, with or without 'make config' if [ -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then @@ -2415,16 +2411,18 @@ if [ -n "$PM_PACKAGES" -o "$PM_PACKAGES_ fetch_package () { local do_fetch - # Duplicated from pkg_init() - [ -z "$packages" ] && + if [ -z "$ppd" ]; then + # Duplicated from pkg_init() + [ -z "$packages" ] && packages=`pm_make -f/usr/share/mk/bsd.port.mk -V PACKAGES` - [ -n "$packages" ] || fail 'The value of PACKAGES cannot be empty' - - [ -z "$ppd" ] && { ppd=$packages/portmaster-download; export ppd; } + [ -n "$packages" ] || + fail 'The value of PACKAGES cannot be empty' + ppd=$packages/portmaster-download + export ppd + fi if [ ! -d "$ppd" ]; then - [ -n "$PM_SU_VERBOSE" ] && - echo "===>>> Creating $ppd" + [ -n "$PM_SU_VERBOSE" ] && echo "===>>> Creating $ppd" pm_mkdir_s $ppd fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912062142.nB6LgPSI032444>