pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc update pkglint to 4.09:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb11f42dfa46
branches:  trunk
changeset: 490372:fb11f42dfa46
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Mar 07 22:21:15 2005 +0000

description:
update pkglint to 4.09:
Handle ! in .if conditionals, plus move slightly closer to the real
'make's behaviour when using defined() and empty(). Should fix pkg/28346

diffstat:

 doc/CHANGES                          |   4 +++-
 pkgtools/pkglint/Makefile            |   4 ++--
 pkgtools/pkglint/files/lintpkgsrc.pl |  12 ++++++++----
 3 files changed, 13 insertions(+), 7 deletions(-)

diffs (70 lines):

diff -r c1bbf8e1cb40 -r fb11f42dfa46 doc/CHANGES
--- a/doc/CHANGES       Mon Mar 07 21:01:22 2005 +0000
+++ b/doc/CHANGES       Mon Mar 07 22:21:15 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.9465 2005/03/07 21:01:22 xtraeme Exp $
+$NetBSD: CHANGES,v 1.9466 2005/03/07 22:21:55 abs Exp $
 
 Changes to the packages collection and infrastructure in 2005:
 
@@ -1338,3 +1338,5 @@
        Added e16menuedit2-0.0.1 [agc 2005-03-07]
        bsd.pkg.mk: started freeze for pkgsrc-2005Q1 branch [agc 2005-03-07]
        Updated dspam to 3.2.8 [xtraeme 2005-03-07]
+       Updated pkglint to 4.09: [abs 2005-03-07]
+
diff -r c1bbf8e1cb40 -r fb11f42dfa46 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Mon Mar 07 21:01:22 2005 +0000
+++ b/pkgtools/pkglint/Makefile Mon Mar 07 22:21:15 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.224 2005/02/24 22:50:55 rillig Exp $
+# $NetBSD: Makefile,v 1.225 2005/03/07 22:21:15 abs Exp $
 #
 
-DISTNAME=      pkglint-4.08
+DISTNAME=      pkglint-4.09
 CATEGORIES=    pkgtools devel
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r c1bbf8e1cb40 -r fb11f42dfa46 pkgtools/pkglint/files/lintpkgsrc.pl
--- a/pkgtools/pkglint/files/lintpkgsrc.pl      Mon Mar 07 21:01:22 2005 +0000
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl      Mon Mar 07 22:21:15 2005 +0000
@@ -1,6 +1,6 @@
 #!@PERL@
 
-# $NetBSD: lintpkgsrc.pl,v 1.96 2005/02/05 15:39:44 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.97 2005/03/07 22:21:15 abs Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -1101,15 +1101,19 @@
     # XXX Could do something with target
     while ( $test =~ /(target|empty|make|defined|exists)\s*\(([^()]+)\)/ )
        {
+       my $var = $${vars}{$2};
+       if (defined $var && $var eq $magic_undefined)
+           { $var = undef; }
        if ($1 eq 'exists')
            { $_ = (-e $2) ?1 :0; }
        elsif( $1 eq 'defined')
-           { $_ = (defined($${vars}{$2}) ?1 :0); }
+           { $_ = defined($var) ?1 :0; }
        elsif( $1 eq 'empty')
-           { $_ = ((not defined($${vars}{$2}) or (length($${vars}{$2}) == 0)) ?1 :0); }
+           { $_ = ((not defined($var) or (length($var) == 0)) ?1 :0); }
        else
            { $_ = 0; }
        $test =~ s/$1\s*\([^()]+\)/$_/;
+       debug("conditional: update to $test\n");
        }
     while ( $test =~ /([^\s()\|\&]+)\s+(!=|==)\s+([^\s()]+)/ )
        {
@@ -1119,7 +1123,7 @@
            { $_ = ($1 ne $3) ?1 :0; }
        $test =~ s/[^\s()\|\&]+\s+(!=|==)\s+[^\s()]+/$_/;
        }
-    if ($test !~ /[^<>\d()\s&|.]/ )
+    if ($test !~ /[^<>\d()\s&|.!]/ )
        {
        $false = eval "($test)?0:1";
        if (!defined $false)



Home | Main Index | Thread Index | Old Index