pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Allow the "-" character in th...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bc4f68a8f1f0
branches:  trunk
changeset: 504150:bc4f68a8f1f0
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Dec 05 21:46:18 2005 +0000

description:
- 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.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 721491104c7e -r bc4f68a8f1f0 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Dec 05 20:49:47 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Dec 05 21:46:18 2005 +0000
@@ -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 @@
                }
 
        } 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 @@
                        $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) {



Home | Main Index | Thread Index | Old Index