ports/115733: [PATCH] ports-mgmt/portconf: support multiple ports per line

Sean C. Farley scf at FreeBSD.org
Wed Aug 22 20:50:02 UTC 2007


>Number:         115733
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portconf: support multiple ports per line
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 20:50:01 GMT 2007
>Closed-Date:
>Last-Modified:
>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 at 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 at FreeBSD.org>,
 #                    Alex Dupre <ale at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list