From sean-freebsd@farley.org  Wed Aug 22 20:43:57 2007
Return-Path: <sean-freebsd@farley.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 22A4716A417;
	Wed, 22 Aug 2007 20:43:57 +0000 (UTC)
	(envelope-from sean-freebsd@farley.org)
Received: from mail.farley.org (farley.org [67.64.95.201])
	by mx1.freebsd.org (Postfix) with ESMTP id C7D5313C46E;
	Wed, 22 Aug 2007 20:43:56 +0000 (UTC)
	(envelope-from sean-freebsd@farley.org)
Received: from thor.farley.org (thor.farley.org [192.168.1.5])
	by mail.farley.org (8.14.1/8.14.1) with ESMTP id l7MKhq4m019917;
	Wed, 22 Aug 2007 15:43:52 -0500 (CDT)
	(envelope-from sean-freebsd@mail.farley.org)
Received: from thor.farley.org (localhost [127.0.0.1])
	by thor.farley.org (8.14.1/8.14.1) with ESMTP id l7MKhpga040960;
	Wed, 22 Aug 2007 15:43:51 -0500 (CDT)
	(envelope-from sean-freebsd@thor.farley.org)
Received: (from root@localhost)
	by thor.farley.org (8.14.1/8.14.1/Submit) id l7MKhpNI040959;
	Wed, 22 Aug 2007 15:43:51 -0500 (CDT)
	(envelope-from sean-freebsd)
Message-Id: <200708222043.l7MKhpNI040959@thor.farley.org>
Date: Wed, 22 Aug 2007 15:43:51 -0500 (CDT)
From: "Sean C. Farley" <scf@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ale@freebsd.org
Subject: [PATCH] ports-mgmt/portconf: support multiple ports per line
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         115733
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portconf: support multiple ports per line
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 20:50:01 GMT 2007
>Closed-Date:    Sun Sep 23 11:43:48 GMT 2007
>Last-Modified:  Sun Sep 23 11:50:03 GMT 2007
>Originator:     Sean C. Farley
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Jul 29 20:06:46 CDT 2007
>Description:
This patch adds support to allow multiple ports on a single line.
Instead of having to do:
port1:		WITH_COOL_FEATURE
port2:		WITH_COOL_FEATURE

you can do this:
port1 port2:	WITH_COOL_FEATURE

Port maintainer (ale@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- portconf-1.2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portconf.orig/files/portconf.sh.in /usr/ports/ports-mgmt/portconf/files/portconf.sh.in
--- /usr/ports/ports-mgmt/portconf.orig/files/portconf.sh.in	2006-09-06 07:50:31.000000000 -0500
+++ /usr/ports/ports-mgmt/portconf/files/portconf.sh.in	2007-08-22 15:39:11.000000000 -0500
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh -f
 #
 # Copyright (c) 2006 Florent Thoumie <flz@FreeBSD.org>,
 #                    Alex Dupre <ale@FreeBSD.org>
@@ -34,8 +34,9 @@
 fi
 _pwd=`pwd`
 sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do
-    _port=${_line%%:*}
-    if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
-	echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g'
-    fi
+    for _port in ${_line%%:*}; do
+        if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
+            echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g'
+        fi
+    done
 done
--- portconf-1.2.patch ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Aug 22 20:50:09 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115733 
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sun Sep 23 11:43:44 UTC 2007 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115733 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/115733: commit references a PR
Date: Sun, 23 Sep 2007 11:43:50 +0000 (UTC)

 edwin       2007-09-23 11:43:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ports-mgmt/portconf/files portconf.sh.in 
   Log:
   [PATCH] ports-mgmt/portconf: support multiple ports per line
   
           This patch adds support to allow multiple ports on a single line.
           Instead of having to do:
           port1: WITH_COOL_FEATURE
           port2: WITH_COOL_FEATURE
   
           you can do this:
           port1 port2: WITH_COOL_FEATURE
   
   PR:             ports/115733
   Submitted by:   "Sean C. Farley" <scf@freebsd.org>
   Approved by:    maintainer timeout
   
   Revision  Changes    Path
   1.3       +7 -6      ports/ports-mgmt/portconf/files/portconf.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
