svn commit: r220405 - user/dougb/portmaster

Doug Barton dougb at FreeBSD.org
Thu Apr 7 00:30:33 UTC 2011


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"


More information about the svn-src-user mailing list