Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2003 17:02:17 +0800 (CST)
From:      Yen-Ming Lee <leeym@utopia.leeym.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/60608: patch for devel/portlint
Message-ID:  <20031227090217.7288F3EA5A3@utopia.leeym.com>
Resent-Message-ID: <200312270910.hBR9A97Y045474@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60608
>Category:       ports
>Synopsis:       patch for devel/portlint
>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:   Sat Dec 27 01:10:09 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 5.2-RC FreeBSD 5.2-RC #7: Thu Dec 18 09:21:26 CST 2003 root@utopia.leeym.com:/mnt3/obj/usr/src/sys/UTOPIA i386


	
>Description:

Many ports use ${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' file...
to make it PREFIX-independent.
However, portlint will warn on these lines.

>How-To-Repeat:

>Fix:

	

--- portlint.diff begins here ---
Index: src/portlint.pl
===================================================================
RCS file: /home/pcvs/ports/devel/portlint/src/portlint.pl,v
retrieving revision 1.50
diff -u -r1.50 portlint.pl
--- src/portlint.pl	27 Dec 2003 00:45:20 -0000	1.50
+++ src/portlint.pl	27 Dec 2003 08:56:34 -0000
@@ -2122,6 +2122,12 @@
 	my($s, $i, %cmdnames);
 	my($pre);
 
+	# trim all trailing backslash and newline
+	$str =~ s/\\\n\s*/ /g;
+	
+	# ignore parameter string to reinplace command
+	$str =~ s/([ \t][\@-]?(?:sed|\$[\{\(]SED[\}\)]|\$[\{\(]REINPLACE_CMD[\}\)]))((?:\s+\-\w+)*\s+(?:"(?:\\"|[^"\n])*"|'(?:\\'|[^'\n])*'))+(.*)/$1$3/g; #'
+
 	# ignore parameter string to echo command
 	$str =~ s/[ \t][\@-]?(echo|\$[\{\(]ECHO[\}\)]|\$[\{\(]ECHO_MSG[\}\)])[ \t]+("(\\'|\\"|[^"])*"|'(\\'|\\"|[^"])*')[ \t]*[;\n]//; #'
 
--- portlint.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031227090217.7288F3EA5A3>