From nobody@FreeBSD.org  Fri Oct  5 13:23:49 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BCABF1065674
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Oct 2012 13:23:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A74998FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Oct 2012 13:23:49 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q95DNn3C074319
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 5 Oct 2012 13:23:49 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q95DNnvn074318;
	Fri, 5 Oct 2012 13:23:49 GMT
	(envelope-from nobody)
Message-Id: <201210051323.q95DNnvn074318@red.freebsd.org>
Date: Fri, 5 Oct 2012 13:23:49 GMT
From: Manuel <manuel-freebsd@mausz.at>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] ports-mgmt/portconf: allow dash and plus symbols in variable names
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172355
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portconf: allow dash and plus symbols in variable names
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 05 13:30:14 UTC 2012
>Closed-Date:    Mon Aug 12 13:05:32 UTC 2013
>Last-Modified:  Mon Aug 12 13:10:01 UTC 2013
>Originator:     Manuel
>Release:        
>Organization:
>Environment:
>Description:
Please add dash (-) and plus (+) symbols to allowed characters in variable names:

Dash symbols are required when using OptionsNG and $UNIQUENAME_SET/UNSET. e.g. apache22-event-mpm_SET=...

Plus symbols can be used to extend existing variables. e.g. OPTIONS_SET+=...

>How-To-Repeat:

>Fix:
--- /usr/local/libexec/portconf.orig    2012-10-05 14:47:42.000000000 +0200
+++ /usr/local/libexec/portconf 2012-10-05 15:14:08.000000000 +0200
@@ -36,7 +36,7 @@
 sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do
     for _port in ${_line%%:*}; do
         if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
-            echo ${_line#*:} | sed -E 's/([A-Za-z0-9_]+)(=([^|]+))?/\1=\3/g;s/!([A-Za-z0-9_]+)=([^|]+)?/.undef \1/g;s/ *\| */|/g;s/ /%/g'
+            echo ${_line#*:} | sed -E 's/([A-Za-z0-9_\-]+\+?)(=([^|]+))?/\1=\3/g;s/!([A-Za-z0-9_]+)=([^|]+)?/.undef \1/g;s/ *\| */|/g;s/ /%/g'
         fi
     done
 done


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Oct 5 13:30:29 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Naram Qashat <cyberbotx@cyberbotx.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172355: [PATCH] ports-mgmt/portconf: allow dash and plus
 symbols in variable names
Date: Fri, 07 Jun 2013 15:27:40 -0400

 With the recent changes to remove the old options framework, can this PR please 
 be committed? I've been using it myself and it works fine, without it you cannot 
 do the things that the description says it corrects. I'm not sure if the case of 
 !<something> needs the dash symbol in it's regular expression, as I doubt the 
 new options framework would ever need that.
 
 Thanks,
 Naram Qashat
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Mon Aug 12 13:05:20 UTC 2013 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172355: commit references a PR
Date: Mon, 12 Aug 2013 13:05:15 +0000 (UTC)

 Author: ale
 Date: Mon Aug 12 13:05:07 2013
 New Revision: 324628
 URL: http://svnweb.freebsd.org/changeset/ports/324628
 
 Log:
   Add dash (-) and plus (+) symbols to allowed characters in variable names:
   
   Dash symbols are required when using OptionsNG and $UNIQUENAME_SET/UNSET. e.g. apache22-event-mpm_SET=...
   
   Plus symbols can be used to extend existing variables. e.g. OPTIONS_SET+=...
   
   PR:		ports/172355, ports/181119
   Submitted by:	Manuel <manuel-freebsd@mausz.at>,
   		Gea-Suan Lin <gslin@gslin.org>
 
 Modified:
   head/ports-mgmt/portconf/Makefile
   head/ports-mgmt/portconf/files/portconf.sh.in
 
 Modified: head/ports-mgmt/portconf/Makefile
 ==============================================================================
 --- head/ports-mgmt/portconf/Makefile	Mon Aug 12 12:55:03 2013	(r324627)
 +++ head/ports-mgmt/portconf/Makefile	Mon Aug 12 13:05:07 2013	(r324628)
 @@ -8,7 +8,7 @@
  #
  
  PORTNAME=	portconf
 -PORTVERSION=	1.5
 +PORTVERSION=	1.6
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	# none
  DISTFILES=	# none
 
 Modified: head/ports-mgmt/portconf/files/portconf.sh.in
 ==============================================================================
 --- head/ports-mgmt/portconf/files/portconf.sh.in	Mon Aug 12 12:55:03 2013	(r324627)
 +++ head/ports-mgmt/portconf/files/portconf.sh.in	Mon Aug 12 13:05:07 2013	(r324628)
 @@ -36,7 +36,7 @@ _pwd=`pwd`
  sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do
      for _port in ${_line%%:*}; do
          if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
 -            echo ${_line#*:} | sed -E 's/([A-Za-z0-9_]+)(=([^|]+))?/\1=\3/g;s/!([A-Za-z0-9_]+)=([^|]+)?/.undef \1/g;s/ *\| */|/g;s/ /%/g'
 +            echo ${_line#*:} | sed -E 's/([A-Za-z0-9_\-]+\+?)(=([^|]+))?/\1=\3/g;s/!([A-Za-z0-9_]+)=([^|]+)?/.undef \1/g;s/ *\| */|/g;s/ /%/g'
          fi
      done
  done
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
