summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2007-10-25 16:08:48 +0000
committerrillig <rillig>2007-10-25 16:08:48 +0000
commit2037063cbf532b357bde70ae713b3a0e2bbe6ca5 (patch)
tree9c2cba7d57d1bb0ae637228a206373247f779711 /pkgtools
parent843d56cca9e1e6bf13023693056b897c03954723 (diff)
downloadpkgsrc-2037063cbf532b357bde70ae713b3a0e2bbe6ca5.tar.gz
It's not very useful to have empty PLIST files, so warn about it. This
may happen when a package has been newly created and the print-PLIST target has not yet been run.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl16
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 89b1058327b..9489ab2b922 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.721 2007/10/13 08:55:48 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.722 2007/10/25 16:08:48 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -7298,6 +7298,20 @@ sub checkfile_PLIST($) {
}
checkline_rcsid($lines->[0], "\@comment ");
+ if (@$lines == 1) {
+ $lines->[0]->log_warning("PLIST files shouldn't be empty.");
+ $lines->[0]->explain_warning(
+
+"One reason for empty PLISTs is that this is a newly created package",
+"and that the author didn't run \"bmake print-PLIST\" after installing",
+"the files.",
+"",
+"Another reason, common for Perl packages, is that the PLIST is",
+"automatically generated. Since there is no use of the empty PLIST file,",
+"it shouldn't be necessary. This should be fixed in the pkgsrc",
+"infrastructure.");
+ }
+
# Get the list of all files from the PLIST.
$all_files = {};
foreach my $line (@{$lines}) {