pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint fix. pkglint doesn't treat files endi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dbd4f8633951
branches:  trunk
changeset: 588902:dbd4f8633951
user:      cheusov <cheusov%pkgsrc.org@localhost>
date:      Mon May 23 10:59:36 2011 +0000

description:
fix. pkglint doesn't treat files ending with .mk under patches/ directory
   as Makefiles. Version bumped. Oked by wiz@

diffstat:

 pkgtools/pkglint/Makefile         |   4 ++--
 pkgtools/pkglint/files/pkglint.pl |  11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 95466f189f65 -r dbd4f8633951 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Mon May 23 08:28:42 2011 +0000
+++ b/pkgtools/pkglint/Makefile Mon May 23 10:59:36 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.388 2011/02/01 09:08:01 wiz Exp $
+# $NetBSD: Makefile,v 1.389 2011/05/23 10:59:36 cheusov Exp $
 #
 
 # Note: if you update the version number, please have a look at the
 # changes between the CVS tag "pkglint_current" and HEAD.
 # After updating, please re-set the CVS tag to HEAD.
-DISTNAME=      pkglint-4.97
+DISTNAME=      pkglint-4.98
 CATEGORIES=    pkgtools
 MASTER_SITES=  # none
 DISTFILES=     # none
diff -r 95466f189f65 -r dbd4f8633951 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon May 23 08:28:42 2011 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon May 23 10:59:36 2011 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.825 2011/02/01 09:08:01 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.826 2011/05/23 10:59:37 cheusov Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -7976,9 +7976,6 @@
        } elsif ($basename eq "buildlink3.mk") {
                $opt_check_bl3 and checkfile_buildlink3_mk($fname);
 
-       } elsif ($basename =~ m"^(?:.*\.mk|Makefile.*)$") {
-               $opt_check_mk and checkfile_mk($fname);
-
        } elsif ($basename =~ m"^DESCR") {
                $opt_check_DESCR and checkfile_DESCR($fname);
 
@@ -8000,6 +7997,9 @@
        } elsif ($fname =~ m"(?:^|/)patches/[^/]*$") {
                log_warning($fname, NO_LINE_NUMBER, "Patch files should be named \"patch-\", followed by letters, '-', '_', '.', and digits only.");
 
+       } elsif ($basename =~ m"^(?:.*\.mk|Makefile.*)$") {
+               $opt_check_mk and checkfile_mk($fname);
+
        } elsif ($basename =~ m"^PLIST") {
                $opt_check_PLIST and checkfile_PLIST($fname);
 
@@ -8326,7 +8326,8 @@
        # Determine the used variables before checking any of the
        # Makefile fragments.
        foreach my $fname (@files) {
-               if ($fname =~ m"^((?:.*/)?Makefile\..*|.*\.mk)$"
+               if (($fname =~ m"^((?:.*/)?Makefile\..*|.*\.mk)$")
+               && (not $fname =~ m"patch-")
                && (defined(my $lines = load_lines($fname, true)))) {
                        parselines_mk($lines);
                        determine_used_variables($lines);



Home | Main Index | Thread Index | Old Index