summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-05-15 02:38:56 +0000
committerrillig <rillig@pkgsrc.org>2005-05-15 02:38:56 +0000
commit6f71ee99dc785f469bd69abc4ef1d77f765bfa20 (patch)
tree3255c1c2bcc73333248f5048f0a3a4a64f8cee13 /pkgtools/pkglint
parent96705cee02a258d7928bed5165516934783235bd (diff)
downloadpkgsrc-6f71ee99dc785f469bd69abc4ef1d77f765bfa20.tar.gz
Added a command line option to disable warnings on unsorted things like
PLISTs and SUBDIRs in category Makefiles. The default behavior is unchanged. Updated the man pages. Bumped PKGREVISION.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.010
-rw-r--r--pkgtools/pkglint/files/pkglint.113
-rw-r--r--pkgtools/pkglint/files/pkglint.pl14
4 files changed, 24 insertions, 17 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 41de0ff0053..9d4f772e0ed 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.234 2005/05/10 00:07:53 rillig Exp $
+# $NetBSD: Makefile,v 1.235 2005/05/15 02:38:56 rillig Exp $
#
-DISTNAME= pkglint-4.13
+DISTNAME= pkglint-4.14
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0
index f78f19ebcdf..f30186ae3c0 100644
--- a/pkgtools/pkglint/files/pkglint.0
+++ b/pkgtools/pkglint/files/pkglint.0
@@ -90,9 +90,11 @@ DDEESSCCRRIIPPTTIIOONN
[no-]paren Warn if variables are used like $(VAR) in Makefiles. They
should always be used like ${VAR}.
- [no-]patches
- Warn if a patch file patches more than one file or if the
- patches differ from what is recorded in the distinfo file.
+ [no-]sort Warn if items of a list are not correctly sorted. Currently
+ this affects PLISTs and the SUBDIRs in category Makefiles.
+
+ [no-]types Warn for some Makefile variables if their assigned values do
+ not match their type.
[no-]workdir
Warn about existing _w_o_r_k_* directories. They might be commit-
@@ -141,4 +143,4 @@ BBUUGGSS
ings concerning Makefiles do not print the file and line number where the
warning originated.
- October 16, 2004 3
+ May 15, 2005 3
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1
index 60d98b895a0..67385a8788a 100644
--- a/pkgtools/pkglint/files/pkglint.1
+++ b/pkgtools/pkglint/files/pkglint.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkglint.1,v 1.10 2005/05/10 19:04:53 rillig Exp $
+.\" $NetBSD: pkglint.1,v 1.11 2005/05/15 02:38:56 rillig Exp $
.\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp
.\"
.\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun@itojun.org>.
@@ -6,7 +6,7 @@
.\"
.\" Roland Illig <roland.illig@gmx.de>, 2004.
.\"
-.Dd October 16, 2004
+.Dd May 15, 2005
.Dt PKGLINT 1
.Sh NAME
.Nm pkglint
@@ -110,9 +110,12 @@ Most files should not be executable until they are installed.
.It [no-]paren
Warn if variables are used like $(VAR) in Makefiles.
They should always be used like ${VAR}.
-.It [no-]patches
-Warn if a patch file patches more than one file or if the patches differ
-from what is recorded in the distinfo file.
+.It [no-]sort
+Warn if items of a list are not correctly sorted.
+Currently this affects PLISTs and the SUBDIRs in category Makefiles.
+.It [no-]types
+Warn for some Makefile variables if their assigned values do not match
+their type.
.It [no-]workdir
Warn about existing
.Pa work*
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 05d0080801f..4a1b0755a44 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.146 2005/05/10 19:04:53 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.147 2005/05/15 02:38:56 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by Hubert Feyrer <hubertf@netbsd.org>,
@@ -279,17 +279,19 @@ my (%checks) = (
"newpkg" => [\$opt_check_newpkg, "special checks for uncommitted packages"],
);
-my $opt_warn_exec = true;
my $opt_warn_absname = true;
my $opt_warn_directcmd = true;
+my $opt_warn_exec = true;
my $opt_warn_paren = true;
-my $opt_warn_workdir = true;
+my $opt_warn_sort = true;
my $opt_warn_types = true;
+my $opt_warn_workdir = true;
my (%warnings) = (
- "exec" => [\$opt_warn_exec, "warn if source files are executable"],
"absname" => [\$opt_warn_absname, "warn about use of absolute file names"],
"directcmd" => [\$opt_warn_directcmd, "warn about use of direct command names instead of Make variables"],
+ "exec" => [\$opt_warn_exec, "warn if source files are executable"],
"paren" => [\$opt_warn_paren, "warn about use of \$(VAR) instead of \${VAR} in Makefiles"],
+ "sort" => [\$opt_warn_sort, "warn about any unsorted things"],
"types" => [\$opt_warn_types, "do some simple type checking in Makefiles"],
"workdir" => [\$opt_warn_workdir, "warn that work* should not be committed into CVS"],
);
@@ -876,7 +878,7 @@ sub checkfile_PLIST($) {
$line->log_error("use of full pathname disallowed.");
}
- if ($line->text =~ qr"^\w") {
+ if ($opt_warn_sort && $line->text =~ qr"^\w") {
if (defined($last_file_seen)) {
if ($last_file_seen gt $line->text) {
$line->log_warning( $line->text." should be sorted before ${last_file_seen}.");
@@ -2094,7 +2096,7 @@ sub category_check() {
$line->log_error("SUBDIR+= expected.");
}
push(@makefile_subdirs, $subdir);
- if ($last_subdir ge $subdir) {
+ if ($opt_warn_sort && $last_subdir ge $subdir) {
$line->log_error("$subdir should come before $last_subdir.");
}
$last_subdir = $subdir;