From 79c16d74db3a56df373ec72ac41969186ad6a88f Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 5 Dec 2005 21:46:18 +0000 Subject: - Allow the "-" character in the "variable name" part of a ShellWord that is an assignment. This change extends the quoting checks to CONFIGURE_ARGS in a usable way. --- pkgtools/pkglint/files/pkglint.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index a9f3eedaa7d..66b09ed6616 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.414 2005/12/05 20:23:44 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.415 2005/12/05 21:46:18 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -2001,7 +2001,7 @@ sub checkline_basic_vartype($$$$$) { } } elsif ($type eq "ShellWord") { - if ($value =~ qr"^([\w_]+)=(([\"']?)\$\{([\w_]+)\}\3)$") { + if ($value =~ qr"^([\w_\-]+)=(([\"']?)\$\{([\w_]+)\}\3)$") { my ($key, $vexpr, undef, $vname) = ($1, $2, $3, $4); my $mod = ($vname =~ regex_gnu_configure_volatile_vars) ? ":M*:Q" : ":Q"; my $fixed_vexpr = "\${${vname}${mod}}"; @@ -2009,7 +2009,7 @@ sub checkline_basic_vartype($$$$$) { $line->explain("See the pkgsrc guide, section \"quoting guideline\", for details."); $line->replace($value, "${key}=${fixed_vexpr}"); - } elsif ($value =~ qr"^([\w_]+)=(\$\{([\w_]+):Q\})$") { + } elsif ($value =~ qr"^([\w_\-]+)=(\$\{([\w_]+):Q\})$") { my ($key, $vexpr, $vname) = ($1, $2, $3); my $fixed_vexpr = "\${${vname}:M*:Q}"; if ($vname =~ regex_gnu_configure_volatile_vars) { -- cgit v1.2.3