pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Added command line option -q|--...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b4a49f4ee4b
branches:  trunk
changeset: 493617:7b4a49f4ee4b
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue May 10 19:04:53 2005 +0000

description:
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:

 pkgtools/pkglint/files/pkglint.0  |  105 +++++++++++++++++++++++++++++++------
 pkgtools/pkglint/files/pkglint.1  |    4 +-
 pkgtools/pkglint/files/pkglint.pl |   22 +++++--
 3 files changed, 105 insertions(+), 26 deletions(-)

diffs (245 lines):

diff -r 284315d1180f -r 7b4a49f4ee4b pkgtools/pkglint/files/pkglint.0
--- a/pkgtools/pkglint/files/pkglint.0  Tue May 10 18:58:27 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.0  Tue May 10 19:04:53 2005 +0000
@@ -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 @@
 
      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 @@
 
      --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.
 
-     --vv          Be verbose.  Show the progress report for items that are
-                 being checked.
+     [no-]newpkg
+                 Enable special checks for uncommitted packages.
+
+     [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 @@
      /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 @@
      OK: ...       This type of messages is used in verbose mode (--vv).
 
 AAUUTTHHOORRSS
-     Jun-ichiro Itoh <itojun%itojun.org@localhost> and Yoshishige Arai
-     <ryo2%on.rim.or.jp@localhost>.  Many people have contributed patches and com-
-     ments/suggestions.
+     Jun-ichiro Itoh <itojun%itojun.org@localhost>, Yoshishige Arai <ryo2%on.rim.or.jp@localhost>,
+     and Roland Illig <roland.illig%gmx.de@localhost>.  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 -r 284315d1180f -r 7b4a49f4ee4b pkgtools/pkglint/files/pkglint.1
--- a/pkgtools/pkglint/files/pkglint.1  Tue May 10 18:58:27 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.1  Tue May 10 19:04:53 2005 +0000
@@ -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@localhost>.
@@ -61,6 +61,8 @@
 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 -r 284315d1180f -r 7b4a49f4ee4b pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue May 10 18:58:27 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue May 10 19:04:53 2005 +0000
@@ -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@localhost>,
@@ -117,12 +117,16 @@
        }
 }
 
-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_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_patches_patch($);
 sub checkfile_PLIST($);
 
-sub print_summary_and_exit();
 sub checkperms($);
 sub checkpathname($);
 sub checklastline($);
@@ -449,6 +454,7 @@
                "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 @@
        } 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() {



Home | Main Index | Thread Index | Old Index