Date: Thu, 7 Apr 2011 00:30:32 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r220405 - user/dougb/portmaster Message-ID: <201104070030.p370UW3S023528@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Thu Apr 7 00:30:32 2011 New Revision: 220405 URL: http://svn.freebsd.org/changeset/base/220405 Log: micro-optimize check_for_updates() a little more by only checking the existence of the origin directory if necessary. In multiport() don't test for the existence of the origin directory if PM_INDEX_ONLY is set. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Wed Apr 6 23:59:59 2011 (r220404) +++ user/dougb/portmaster/portmaster Thu Apr 7 00:30:32 2011 (r220405) @@ -1537,7 +1537,7 @@ check_for_updates () { [ -n "$PM_INDEX_FIRST" ] || skip=index_skip fi - if [ -d "$pd/$origin" -a -z "$do_update" -a -z "$skip" ]; then + if [ -z "$do_update" -a -z "$skip" ] && [ -d "$pd/$origin" ]; then if ! pm_cd $pd/$origin; then if [ -e "$pdb/$iport/+IGNOREME" ]; then echo " ===>>> Warning: Unable to cd to $pd/$origin" @@ -2606,7 +2606,7 @@ multiport () { port=${port#$pdb/} case "$port" in */*) port=${port#$pd/} - if [ -d "$pd/${port}" ]; then + if [ -n "$PM_INDEX_ONLY" ] || [ -d "$pd/${port}" ]; then worklist_temp="$worklist_temp $port" else fail "$pd/${port} does not exist"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104070030.p370UW3S023528>