summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig>2005-09-28 09:44:42 +0000
committerrillig <rillig>2005-09-28 09:44:42 +0000
commitd85d06ef36d28ae0ceac0ae2e307160ff9c3a26a (patch)
tree4c9001659cc9429e3c536b6806ad0315dda80514 /pkgtools/pkglint
parent6a5ac5859bc46b011d19dda687b43637721a04b9 (diff)
downloadpkgsrc-d85d06ef36d28ae0ceac0ae2e307160ff9c3a26a.tar.gz
Updated to pkglint-4.23.
Added the -R command line option to allow more RCS Id tags than $NetBSD$ to appear in line 1 of almost every file. Suggested by dillo.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.035
-rw-r--r--pkgtools/pkglint/files/pkglint.114
-rw-r--r--pkgtools/pkglint/files/pkglint.pl16
4 files changed, 43 insertions, 26 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index d3ec8872191..4a91be4e0e4 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.255 2005/09/27 21:13:20 rillig Exp $
+# $NetBSD: Makefile,v 1.256 2005/09/28 09:44:42 rillig Exp $
#
-DISTNAME= pkglint-4.22
+DISTNAME= pkglint-4.23
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0
index 8cdfb2085ba..37aa23f2a45 100644
--- a/pkgtools/pkglint/files/pkglint.0
+++ b/pkgtools/pkglint/files/pkglint.0
@@ -1,4 +1,4 @@
-PKGLINT(1) NetBSD General Commands Manual PKGLINT(1)
+PKGLINT(1) NetBSD Reference Manual PKGLINT(1)
NNAAMMEE
ppkkgglliinntt - a verifier for pkgsrc directories
@@ -22,13 +22,16 @@ DDEESSCCRRIIPPTTIIOONN
--hh|----hheellpp Show the summary of command line options, then
exit.
- --II Show the Makefile that is constructed by
- including all the files that are slurped in via
+ --II Show the Makefile that is constructed by in-
+ cluding all the files that are slurped in via
.include directives. This flag is mainly for
debugging.
- --qq|----qquuiieett Don't print the errors and warnings summary
- before terminating.
+ --RR|----rrccssiiddssttrriinngg Allow other RCS Id strings than NetBSD. Multi-
+ ple strings may be concatenated with `|'.
+
+ --qq|----qquuiieett Don't print the errors and warnings summary be-
+ fore terminating.
--vv|----vveerrbboossee Be verbose. Show the progress report for items
that are being checked.
@@ -42,8 +45,8 @@ DDEESSCCRRIIPPTTIIOONN
nnoonnee Disable all checks.
- [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all
- included files.
+ [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all in-
+ cluded files.
[[nnoo--]]MMEESSSSAAGGEE Check MESSAGE files.
@@ -80,13 +83,13 @@ DDEESSCCRRIIPPTTIIOONN
alphabetically. This warning is disabled by
default.
- [[nnoo--]]ttyyppeess Warn for some Makefile variables if their
- assigned values do not match their type.
+ [[nnoo--]]ttyyppeess Warn for some Makefile variables if their as-
+ signed values do not match their type.
[[nnoo--]]wwoorrkkddiirr Warn about existing _w_o_r_k_* directories. They
might be committed to CVS accidentally.
- OOtthheerr aarrgguummeennttss
+ OOtthheerr aarrgguummeennttss
_d_i_r _._._. The pkgsrc directories to be checked. If omit-
ted, the current directory is checked.
@@ -103,6 +106,10 @@ EEXXAAMMPPLLEESS
Checks the category Makefile and reports any warnings it can
find.
+ ppkkgglliinntt --rr --RR ''NNeettBBSSDD||IIdd'' //uussrr//ppkkggssrrcc
+ Check the whole pkgsrc tree while allowing `NetBSD' or `Id'
+ as the RCS Id.
+
DDIIAAGGNNOOSSTTIICCSS
Diagnostics are written to the standard output.
@@ -113,7 +120,7 @@ DDIIAAGGNNOOSSTTIICCSS
critical as errors.
OK: ... Informational messages are only written in verbose mode
- (--vv). Their main use is to aid debugging.
+ (--vv). Their main use is to aid debugging.
AAUUTTHHOORRSS
Jun-ichiro Itoh <itojun@itojun.org>
@@ -125,7 +132,7 @@ AAUUTTHHOORRSS
BBUUGGSS
Many more checks could be added.
- If you don't understand the messages, feel free to ask on the
- <tech-pkg@NetBSD.org> mailing list.
+ If you don't understand the messages, feel free to ask on the <tech-
+ pkg@NetBSD.org> mailing list.
-NetBSD 2.0 September 4, 2005 NetBSD 2.0
+ September 28, 2005 3
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1
index fa86c1a82b4..d8c90f90e22 100644
--- a/pkgtools/pkglint/files/pkglint.1
+++ b/pkgtools/pkglint/files/pkglint.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkglint.1,v 1.20 2005/09/10 22:32:54 wiz Exp $
+.\" $NetBSD: pkglint.1,v 1.21 2005/09/28 09:44:42 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>.
@@ -7,7 +7,7 @@
.\" Roland Illig <roland.illig@gmx.de>, 2004, 2005.
.\" Roland Illig <rillig@NetBSD.org>, 2005.
.\"
-.Dd September 4, 2005
+.Dd September 28, 2005
.Dt PKGLINT 1
.Sh NAME
.Nm pkglint
@@ -40,6 +40,10 @@ Show the summary of command line options, then exit.
Show the Makefile that is constructed by including all the files that
are slurped in via .include directives.
This flag is mainly for debugging.
+.It Fl R Ns | Ns Fl -rcsidstring
+Allow other RCS Id strings than NetBSD.
+Multiple strings may be concatenated with
+.Ql | .
.It Fl q Ns | Ns Fl -quiet
Don't print the errors and warnings summary before terminating.
.It Fl v Ns | Ns Fl -verbose
@@ -121,6 +125,12 @@ Other pkgsrc files.
Checks the patches of the package in the current directory.
.It Ic pkglint \-Wall /usr/pkgsrc/devel
Checks the category Makefile and reports any warnings it can find.
+.It Ic pkglint -r \-R 'NetBSD|Id' /usr/pkgsrc
+Check the whole pkgsrc tree while allowing
+.Ql NetBSD
+or
+.Ql Id
+as the RCS Id.
.El
.Sh DIAGNOSTICS
Diagnostics are written to the standard output.
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 4a783e472f4..5a6cedf3a02 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.289 2005/09/27 21:13:20 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.290 2005/09/28 09:44:42 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -303,7 +303,7 @@ BEGIN {
}
# Buildtime configuration
-my $conf_rcsidstr = 'NetBSD';
+my $conf_rcsidstring = 'NetBSD';
my $conf_pkgsrcdir = '@PKGSRCDIR@';
my $conf_localbase = '@PREFIX@';
my $conf_distver = '@DISTVER@';
@@ -356,6 +356,7 @@ my $opt_autofix = false;
my $opt_dumpmakefile = false;
my $opt_quiet = false;
my $opt_recursive = false;
+my $opt_rcsidstring = $conf_rcsidstring;
my (@options) = (
# [ usage-opt, usage-message, getopt-opt, getopt-action ]
[ "-C{check,...}", "Enable or disable specific checks",
@@ -368,6 +369,8 @@ my (@options) = (
"autofix|F", \$opt_autofix ],
[ "-I|--dumpmakefile", "Dump the Makefile after parsing",
"dumpmakefile|I", \$opt_dumpmakefile ],
+ [ "-R|--rcsidstring", "Set the allowed RCS Id strings",
+ "rcsidstring|R=s", \$opt_rcsidstring ],
[ "-V|--version", "print the version number of pkglint",
"version|V",
sub {
@@ -402,10 +405,8 @@ my (@options) = (
);
# Constants
-my $regex_known_rcs_tag = qr"\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State|$conf_rcsidstr)(?::[^\$]*?|)\$";
my $regex_mail_address = qr"^[-\w\d_.]+\@[-\w\d.]+$";
my $regex_pkgname = qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$";
-my $regex_rcsidstr = qr"\$($conf_rcsidstr)(?::[^\$]*|)\$";
my $regex_unresolved = qr"\$\{";
my $regex_url = qr"^(?:http://|ftp://|#)"; # allow empty URLs
my $regex_url_directory = qr"(?:http://|ftp://)\S+/";
@@ -746,9 +747,8 @@ sub checkline_trailing_whitespace($) {
sub checkline_rcsid_regex($$$) {
my ($line, $prefix_regex, $prefix) = @_;
-
- if ($line->text !~ qr"^${prefix_regex}${regex_rcsidstr}$") {
- $line->log_error("\"${prefix}\$${conf_rcsidstr}\$\" expected.");
+ if ($line->text !~ qr"^${prefix_regex}\$($opt_rcsidstring)(?::[^\$]*|)\$$") {
+ $line->log_error("\"${prefix}\$${opt_rcsidstring}\$\" expected.");
return false;
}
return true;
@@ -1111,7 +1111,7 @@ sub checkfile_patches_patch($$) {
checkline_rcsid($lines->[0], "");
foreach my $line (@{$lines}[1..$#{$lines}]) {
- if ($line->text =~ $regex_known_rcs_tag) {
+ if ($line->text =~ qr"\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State|$opt_rcsidstring)(?::[^\$]*?|)\$") {
my ($tag) = ($1);
$line->log_warning("Possible RCS tag \"\$${tag}\$\". Please remove it by reducing the number of context lines using pkgdiff or \"diff -U[210]\".");
}