summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-12-19 12:04:34 +0000
committerrillig <rillig@pkgsrc.org>2007-12-19 12:04:34 +0000
commite59cd5c03e315ee4e8699d5611bd3972322c9102 (patch)
treebaeb52991bd7334af6040119a31382cd5173de15 /pkgtools/pkglint
parentd877440c8bdffaf6d10294f83be646057a167bb3 (diff)
downloadpkgsrc-e59cd5c03e315ee4e8699d5611bd3972322c9102.tar.gz
- Added support for the new META_PACKAGE variable.
- Warn about duplicate entries in PLISTs.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/files/makevars.map3
-rw-r--r--pkgtools/pkglint/files/pkglint.pl9
2 files changed, 8 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
index c618355e444..322bdb0440b 100644
--- a/pkgtools/pkglint/files/makevars.map
+++ b/pkgtools/pkglint/files/makevars.map
@@ -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_XCONTRIB List of URL [$system]
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 --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index aef230772af..09453b3f47d 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -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 @@ sub checkfile_package_Makefile($$$) {
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 @@ sub checkfile_PLIST($) {
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;