diff options
author | rillig <rillig@pkgsrc.org> | 2005-12-05 21:46:18 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-12-05 21:46:18 +0000 |
commit | 79c16d74db3a56df373ec72ac41969186ad6a88f (patch) | |
tree | b49cd3b764618722e006a5f7b0ce72d0f31b675d | |
parent | b71a1d488b6b45e0a968a4c149990c25b6a09215 (diff) | |
download | pkgsrc-79c16d74db3a56df373ec72ac41969186ad6a88f.tar.gz |
- 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.
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 6 |
1 files 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) { |