From owner-svn-src-user@FreeBSD.ORG Fri Jun 18 07:37:50 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 DC0BA106564A; Fri, 18 Jun 2010 07:37:50 +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 CC7EB8FC0A; Fri, 18 Jun 2010 07:37:50 +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 o5I7boAu090126; Fri, 18 Jun 2010 07:37:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5I7bofb090124; Fri, 18 Jun 2010 07:37:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201006180737.o5I7bofb090124@svn.freebsd.org> From: Doug Barton Date: Fri, 18 Jun 2010 07:37:50 +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: r209285 - 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: Fri, 18 Jun 2010 07:37:50 -0000 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