summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-05-10 19:04:53 +0000
committerrillig <rillig@pkgsrc.org>2005-05-10 19:04:53 +0000
commit3892c4d3c7293bffa938b4576b0293b1342bba1b (patch)
tree2cb56fe5aad7d1ee18eca1dcc06b694f80fc8761 /pkgtools
parentbe08e8b01b187c85a441b98700c2ec04007b5c54 (diff)
downloadpkgsrc-3892c4d3c7293bffa938b4576b0293b1342bba1b.tar.gz
Added command line option -q|--quiet, which suppresses the
errors/warnings summary printed before terminating. Updated the manpage. Updated the preformatted manpage, which was horribly outdated.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.0105
-rw-r--r--pkgtools/pkglint/files/pkglint.14
-rw-r--r--pkgtools/pkglint/files/pkglint.pl22
3 files changed, 105 insertions, 26 deletions
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0
index b4aaa004d15..f78f19ebcdf 100644
--- a/pkgtools/pkglint/files/pkglint.0
+++ b/pkgtools/pkglint/files/pkglint.0
@@ -1,10 +1,10 @@
-PKGLINT(1) NetBSD General Commands Manual PKGLINT(1)
+PKGLINT(1) NetBSD Reference Manual PKGLINT(1)
NNAAMMEE
ppkkgglliinntt - a verifier for pkgsrc directories
SSYYNNOOPPSSIISS
- ppkkgglliinntt [--hhvvIINN] [--BB _n] [_d_i_r]
+ ppkkgglliinntt [--ooppttiioonnss] [_d_i_r]
DDEESSCCRRIIPPTTIIOONN
ppkkgglliinntt tries to verify the content of a pkgsrc directory. The purpose
@@ -14,15 +14,19 @@ DDEESSCCRRIIPPTTIIOONN
ppkkgglliinntt uses very simple regular-expression matching for verifying files
that make up a pkgsrc directory. Note that it does NOT implement a com-
- plete parser for those files. Because of this the user may see some
- extra warnings, especially when checking complex _M_a_k_e_f_i_l_es.
+ plete parser for those files. Because of this the user may see some ex-
+ tra warnings, especially when checking complex _M_a_k_e_f_i_l_es.
OOppttiioonnss
--BB _n Set the number of contiguous blank lines allowed in _M_a_k_e_f_i_l_e
to _n (by default, _n is 1.)
- --hh Show the summary of command line options, then exit.
+ --CC{{[[nnoo--]]cchheecckk,,......}}
+ Enable or disable specific checks. For a list of checks, see
+ below.
+
+ --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 .include directives. This flag
@@ -30,10 +34,71 @@ DDEESSCCRRIIPPTTIIOONN
--NN New package flag. Adds several checks specific to newly sub-
mitted packages. If you are willing to submit the directory
- to be checked as a new package, use this option.
+ to be checked as a new package, use this option. This option
+ is deprecated. Use --CC_n_e_w_p_k_g instead.
+
+ --qq|----qquuiieett Don't print the errors and warnings summary before terminat-
+ ing.
+
+ --vv|----vveerrbboossee
+ Be verbose. Show the progress report for items that are be-
+ ing checked.
+
+ --WW{{[[nnoo--]]wwaarrnn,,......}}
+ Enable or disable specific warnings. For a list of warnings,
+ see below.
+
+ CChheecckkss
+
+ all Enable all checks.
+
+ none Disable all checks. Currently the Makefile is checked in ev-
+ ery case to get meta information about the package structure.
+
+ [no-]MESSAGE
+ Check MESSAGE files.
+
+ [no-]PLIST Check PLIST files.
+
+ [no-]distinfo
+ Check the distinfo file.
+
+ [no-]extra Check remaining files in the package directory.
+
+ [no-]newpkg
+ Enable special checks for uncommitted packages.
- --vv Be verbose. Show the progress report for items that are
- being checked.
+ [no-]patches
+ Check the pkgsrc specific patch files.
+
+ WWaarrnniinnggss
+
+ all Enable all warnings.
+
+ none Disable all warnings.
+
+ [no-]absname
+ Warn if a file contains an absolute pathname.
+
+ [no-]directcmd
+ Warn if a system command name is used instead of a variable
+ (e.g. sed instead of ${SED}).
+
+ [no-]exec Warn if a file in the package directory is executable. Most
+ files should not be executable until they are installed.
+
+ [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-]workdir
+ Warn about existing _w_o_r_k_* directories. They might be commit-
+ ted to CVS accidentally.
+
+ OOtthheerr aarrgguummeennttss
dir The pkgsrc directory to be checked. If omitted, all checks
will be performed on the current directory.
@@ -42,15 +107,19 @@ FFIILLEESS
/usr/pkgsrc/mk/bsd.pkg.mk master Makefile for pkgsrc
/usr/pkgsrc/* pkgsrc collection
+EEXXAAMMPPLLEESS
+ ppkkgglliinntt --CCnnoonnee,,ppaattcchheess. Checks the patches of the package in the current
+ directory. ppkkgglliinntt --WWaallll //uussrr//ppkkggssrrcc//ddeevveell Checks the category Makefile
+ and reports any warnings it can find.
+
DDIIAAGGNNOOSSTTIICCSS
Messages will be sent to standard output, not standard error.
- FATAL: ... This type of error messages suggests that there is some
- fatal error in the pkgsrc directory. For example, if some
+ FATAL: ... This type of error messages suggests that there is some fa-
+ tal error in the pkgsrc directory. For example, if some
files need a rewrite, or if some necessary files are miss-
ing, this message will show up. This kind of error should
- be fixed BEFORE submitting a pkgsrc via send-pr to the
- comitters.
+ be fixed BEFORE submitting a package via send-pr(1).
WARN: ... This type of error messages suggests that some files may
(or may not) need some fixes. Basically, warnings are pro-
@@ -63,11 +132,13 @@ DDIIAAGGNNOOSSTTIICCSS
OK: ... This type of messages is used in verbose mode (--vv).
AAUUTTHHOORRSS
- Jun-ichiro Itoh <itojun@itojun.org> and Yoshishige Arai
- <ryo2@on.rim.or.jp>. Many people have contributed patches and com-
- ments/suggestions.
+ Jun-ichiro Itoh <itojun@itojun.org>, Yoshishige Arai <ryo2@on.rim.or.jp>,
+ and Roland Illig <roland.illig@gmx.de>. Many people have contributed
+ patches and comments/suggestions.
BBUUGGSS
- ppkkgglliinntt is not a magic wand, as described above.
+ ppkkgglliinntt still emits too many false positive warnings. Many of the warn-
+ ings concerning Makefiles do not print the file and line number where the
+ warning originated.
-NetBSD 1.6 September 5, 2000 NetBSD 1.6
+ October 16, 2004 3
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1
index acbf8526a19..60d98b895a0 100644
--- a/pkgtools/pkglint/files/pkglint.1
+++ b/pkgtools/pkglint/files/pkglint.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkglint.1,v 1.9 2004/10/16 15:04:26 wiz Exp $
+.\" $NetBSD: pkglint.1,v 1.10 2005/05/10 19:04:53 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>.
@@ -61,6 +61,8 @@ This option is deprecated.
Use
.Fl C Ns Ar newpkg
instead.
+.It Fl q Ns | Ns Fl -quiet
+Don't print the errors and warnings summary before terminating.
.It Fl v Ns | Ns Fl -verbose
Be verbose.
Show the progress report for items that are being checked.
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index e9654a11b21..05d0080801f 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.145 2005/05/10 00:09:18 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.146 2005/05/10 19:04:53 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by Hubert Feyrer <hubertf@netbsd.org>,
@@ -117,12 +117,16 @@ sub log_info($$$)
}
}
-sub print_summary_and_exit()
+sub print_summary_and_exit($)
{
- if ($errors != 0 || $warnings != 0) {
- print("$errors errors and $warnings warnings found.\n");
- } else {
- print "looks fine.\n";
+ my ($quiet) = @_;
+
+ if (!$quiet) {
+ if ($errors != 0 || $warnings != 0) {
+ print("$errors errors and $warnings warnings found.\n");
+ } else {
+ print "looks fine.\n";
+ }
}
exit($errors != 0);
}
@@ -246,8 +250,10 @@ my $opt_committer = true;
my $opt_dumpmakefile = false;
my $opt_contblank = 1;
my $opt_packagedir = ".";
+my $opt_quiet = false;
my (%options) = (
"-p" => "warn about use of \$(VAR) instead of \${VAR}",
+ "-q" => "don't print a summary line when finishing",
"-I" => "dump the Makefile after parsing",
"-N" => "assume a new (still uncommitted) package",
"-B#" => "allow # contiguous blank lines in Makefiles",
@@ -324,7 +330,6 @@ sub checkfile_MESSAGE($);
sub checkfile_patches_patch($);
sub checkfile_PLIST($);
-sub print_summary_and_exit();
sub checkperms($);
sub checkpathname($);
sub checklastline($);
@@ -449,6 +454,7 @@ sub parse_command_line() {
"version|V" => sub { print("$conf_distver\n"); exit(0); },
"conblank|B=i" => \$opt_contblank,
"dumpmakefile|I" => \$opt_dumpmakefile,
+ "quiet|q" => \$opt_quiet,
);
{
local $SIG{__WARN__} = sub {};
@@ -537,7 +543,7 @@ sub main() {
} else {
log_error(NO_FILE, NO_LINE_NUMBER, "cannot check \"$opt_packagedir\".");
}
- print_summary_and_exit();
+ print_summary_and_exit($opt_quiet);
}
sub check_package() {