Bug 172355 - [PATCH] ports-mgmt/portconf: allow dash and plus symbols in variable names
Summary: [PATCH] ports-mgmt/portconf: allow dash and plus symbols in variable names
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-05 14:30 UTC by Manuel
Modified: 2013-08-12 14:10 UTC (History)
0 users

See Also:


Attachments
file.diff (627 bytes, patch)
2012-10-05 14:30 UTC, Manuel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel 2012-10-05 14:30:14 UTC
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+=...
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-05 14:30:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Naram Qashat 2013-06-07 20:27:40 UTC
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
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-08-12 14:05:15 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"
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2013-08-12 14:05:20 UTC
State Changed
From-To: open->closed

Committed, thanks!