pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files When checking the type of varia...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f4c7d7d4ec15
branches:  trunk
changeset: 494911:f4c7d7d4ec15
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue May 31 21:32:45 2005 +0000

description:
When checking the type of variables, the variable name must begin at the
beginning of a line. This fixes false warnings for variables that are
commented out. Added ${JAM_COMMAND} to the commands that may have
"install" or "test" as arguments.

diffstat:

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

diffs (30 lines):

diff -r 8d00a1ad0ead -r f4c7d7d4ec15 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue May 31 21:28:22 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue May 31 21:32:45 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.190 2005/05/31 21:15:06 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.191 2005/05/31 21:32:45 rillig Exp $
 #
 # This version contains lots of changes necessary for NetBSD packages
 # done by:
@@ -1173,7 +1173,7 @@
 
 sub check_Makefile_vartype($) {
        my ($line) = @_;
-       if ($line->text =~ qr"([A-Z_a-z0-9.]+)\s*(=|\?=|\+=)\s*(.*)") {
+       if ($line->text =~ qr"^([A-Z_a-z0-9.]+)\s*(=|\?=|\+=)\s*(.*)") {
                my ($varname, $op, $value) = ($1, $2, $3);
                if ($value =~ qr"\$") {
                        # ignore values that contain other variables
@@ -1289,7 +1289,7 @@
                .*_TARGET
                USE_TOOLS);
        my @ok_shellcmds = (
-               qr"\./Build\s+(?:install|test)",
+               qr"(?:\./Build|\$\{JAM_COMMAND\})\s+(?:install|test)",
                qr"\"[^\"]*${regex_tools}[^\"]*\"");
 
        my %toolvar = ();



Home | Main Index | Thread Index | Old Index