pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/52854: port2pkg: Unescaped left brace in regex is illegal here in regex



>Number:         52854
>Category:       pkg
>Synopsis:       port2pkg: Unescaped left brace in regex is illegal here in regex
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 23 14:55:00 +0000 2017
>Originator:     Susumu Miwa
>Release:        20171211
>Organization:
area51.gr.jp
>Environment:
NetBSD emi.area51.gr.jp 8.99.9 NetBSD 8.99.9 (MYKERNEL) #0: Tue Dec 12 01:34:43 JST 2017  root%emi.area51.gr.jp@localhost:/usr/obj/sys/arch/amd64/compile/MYKERNEL amd64
>Description:
perl has to escape brace.

% sudo port2pkg /home/rin/work/ports/devel/sonarqube /usr/pkgsrc/devel/sonarqube
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE PORTNAME}/ at /usr/pkg/bin/port2pkg line 129

>How-To-Repeat:
above.
>Fix:
% diff -u port2pkg.pl.src port2pkg.pl
--- port2pkg.pl.src     2017-12-23 23:41:09.344519055 +0900
+++ port2pkg.pl 2017-12-23 23:42:56.804580798 +0900
@@ -126,8 +126,8 @@
        }
 
        if (defined($distname)) {
-               $distname =~ s/\${PORTNAME}/$portname/;
-               $distname =~ s/\${PORTVERSION}/$portversion/;
+               $distname =~ s/\$\{PORTNAME\}/$portname/;
+               $distname =~ s/\$\{PORTVERSION\}/$portversion/;
 
                if ($distname ne "$portname-$portversion") {
                        $pkgname = "$portname-$portversion";



Home | Main Index | Thread Index | Old Index