Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2010 07:37:50 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r209285 - user/dougb/portmaster
Message-ID:  <201006180737.o5I7bofb090124@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Fri Jun 18 07:37:50 2010
New Revision: 209285
URL: http://svn.freebsd.org/changeset/base/209285

Log:
  Catch up with ports version 2.30:
  
  If the user specified --no-confirm don't build the list. With a lot of
  ports to update it can get quite large.
  
  If there are a very large number of ports installed the grep in
  iport_from_origin() can fail with "Argument list too long." It's also
  theoretically possible that the grep would fail for other reasons. So
  if it does, fall back to 'pkg_info -O'. My method is faster which is
  why I'm still trying it first, but this is a sort of "belt and
  suspenders" situation.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Jun 18 07:19:30 2010	(r209284)
+++ user/dougb/portmaster/portmaster	Fri Jun 18 07:37:50 2010	(r209285)
@@ -601,7 +601,10 @@ unset var newopts
 
 iport_from_origin () {
 	local dir
-	dir=`grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS` || return 1
+
+	if ! dir=`grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS 2>/dev/null`; then
+		dir=`pkg_info -q -O $1` || return 1
+	fi
 
 	# It should not happen that more than one port meets this
 	# requirement, but it can if the pkg data is corrupted.
@@ -1942,6 +1945,8 @@ term_printf () {
 }
 
 update_build_l () {
+	[ -n "$PM_NO_CONFIRM" ] && return
+
 	local origin iport new_port
 
 	case "$1" in



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006180737.o5I7bofb090124>