pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Added support for the new MET...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/710b1d7f15b5
branches:  trunk
changeset: 536660:710b1d7f15b5
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Dec 19 12:04:34 2007 +0000

description:
- Added support for the new META_PACKAGE variable.
- Warn about duplicate entries in PLISTs.

diffstat:

 pkgtools/pkglint/files/makevars.map |  3 ++-
 pkgtools/pkglint/files/pkglint.pl   |  9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r f7bc25691d60 -r 710b1d7f15b5 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Wed Dec 19 11:56:19 2007 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Wed Dec 19 12:04:34 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.175 2007/12/07 11:28:17 rillig Exp $
+# $NetBSD: makevars.map,v 1.176 2007/12/19 12:04:34 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -445,6 +445,7 @@
 MASTER_SITE_XEMACS     List of URL [$system]
 MESSAGE_SRC            List of Pathname [$package_list]
 MESSAGE_SUBST          List of ShellWord [c:a,m:a,o:a]
+META_PACKAGE           Yes [$package]
 MISSING_FEATURES       List of Identifier [$system]
 MYSQL_VERSIONS_ACCEPTED        List of { 40 41 50 } [m:s]
 MYSQL_VERSION_DEFAULT  Version [$user]
diff -r f7bc25691d60 -r 710b1d7f15b5 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Dec 19 11:56:19 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Dec 19 12:04:34 2007 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.738 2007/12/13 15:56:49 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.739 2007/12/19 12:04:34 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -6837,15 +6837,16 @@
 
        if (!exists($pkgctx_vardef->{"PLIST_SRC"})
            && !exists($pkgctx_vardef->{"GENERATE_PLIST"})
+           && !exists($pkgctx_vardef->{"META_PACKAGE"})
            && defined($pkgdir)
            && !-f "${current_dir}/$pkgdir/PLIST"
            && !-f "${current_dir}/$pkgdir/PLIST.common") {
                log_warning($fname, NO_LINE_NUMBER, "Neither PLIST nor PLIST.common exist, and PLIST_SRC is unset. Are you sure PLIST handling is ok?");
        }
 
-       if (exists($pkgctx_vardef->{"NO_CHECKSUM"}) && is_emptydir("${current_dir}/${patchdir}")) {
+       if ((exists($pkgctx_vardef->{"NO_CHECKSUM"}) || $pkgctx_vardef->{"META_PACKAGE"}) && is_emptydir("${current_dir}/${patchdir}")) {
                if (-f "${current_dir}/${distinfo_file}") {
-                       log_warning("${current_dir}/${distinfo_file}", NO_LINE_NUMBER, "This file should not exist if NO_CHECKSUM is set.");
+                       log_warning("${current_dir}/${distinfo_file}", NO_LINE_NUMBER, "This file should not exist if NO_CHECKSUM or META_PACKAGE is set.");
                }
        } else {
                if (!-f "${current_dir}/${distinfo_file}") {
@@ -7465,6 +7466,8 @@
                                if (defined($last_file_seen)) {
                                        if ($last_file_seen gt $text) {
                                                $line->log_warning("${text} should be sorted before ${last_file_seen}.");
+                                       } elsif ($last_file_seen eq $text) {
+                                               $line->log_warning("Duplicate filename.");
                                        }
                                }
                                $last_file_seen = $text;



Home | Main Index | Thread Index | Old Index