summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-02-18 16:12:13 +0000
committerrillig <rillig@pkgsrc.org>2006-02-18 16:12:13 +0000
commit5d63c2440013acfc3cb59641033e44f4a97ea9f1 (patch)
treef448f85a9974ac8bf75492f8dfdc93e11f84cd37 /pkgtools
parent021d8a92df98a3833b19c85b7e63e9b20a522085 (diff)
downloadpkgsrc-5d63c2440013acfc3cb59641033e44f4a97ea9f1.tar.gz
- Installing documentation to share/doc/html is deprecated. By default, no
warnings are shown for this, as this would produce more than 20000 new warnings for the current pkgsrc tree. You need to specify -Wplist-depr (new) to see them. Of course, -Wall will work, too. - Updated the documentation and cleaned it up.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.0164
-rw-r--r--pkgtools/pkglint/files/pkglint.132
-rw-r--r--pkgtools/pkglint/files/pkglint.pl8
3 files changed, 96 insertions, 108 deletions
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0
index ef5589ac6e5..e6ad3c448b2 100644
--- a/pkgtools/pkglint/files/pkglint.0
+++ b/pkgtools/pkglint/files/pkglint.0
@@ -1,7 +1,7 @@
PKGLINT(1) NetBSD General Commands Manual PKGLINT(1)
NNAAMMEE
- ppkkgglliinntt -- a verifier for pkgsrc directories
+ ppkkgglliinntt -- static analyzer for pkgsrc packages
SSYYNNOOPPSSIISS
ppkkgglliinntt [--ooppttiioonnss] [_d_i_r _._._.]
@@ -14,127 +14,117 @@ DDEESSCCRRIIPPTTIIOONN
conformance tests. Packages following these rules are assumed to make
future changes to the pkgsrc infrastructure easier.
- OOppttiioonnss
+ OOppttiioonnss
+ --CC{{[[nnoo--]]cchheecckk,,......}} Enable or disable specific checks. For a list of
+ checks, see below.
- --CC{{[[nnoo--]]cchheecckk,,......}} Enable or disable specific checks. For a list
- of checks, see below.
+ --FF|----aauuttooffiixx Repair trivial things automatically.
- --FF|----aauuttooffiixx Repair trivial things automatically. Currently
- this only works for the synchronization of cat-
- egory _M_a_k_e_f_i_l_es.
+ --II Show the _M_a_k_e_f_i_l_e that is constructed by including
+ all the files that are slurped in via `.include'
+ directives. This flag is mainly for debugging.
- --II Show the _M_a_k_e_f_i_l_e that is constructed by
- including all the files that are slurped in via
- `.include' directives. This flag is mainly for
- debugging.
+ --RR|----rrccssiiddssttrriinngg Allow other RCS Id strings than NetBSD. Multiple
+ strings may be concatenated with `|'.
- --RR|----rrccssiiddssttrriinngg Allow other RCS Id strings than NetBSD. Multi-
- ple strings may be concatenated with `|'.
+ --VV|----vveerrssiioonn Print the current ppkkgglliinntt version number and exit.
- --VV|----vveerrssiioonn Print the current ppkkgglliinntt version number and
- exit.
+ --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a list of
+ warnings, see below.
- --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a
- list of warnings, see below.
+ --dd|----ddeebbuugg Enable warnings for parsing errors and other things
+ that haven't been completed yet. This option is sep-
+ arated from the `-W' options because the diagnostics
+ are too hard to understand without detailed knowledge
+ of pkglint's source code.
- --dd|----ddeebbuugg Enable warnings for parsing errors and other
- things that haven't been completed yet. This
- option is separated from the `-W' options
- because the diagnostics are too hard to under-
- stand without detailed knowledge of pkglint's
- source code.
+ --ee|----eexxppllaaiinn Print further explanations for diagnostics. Some-
+ times the reasons for diagnostics are not obvious and
+ need further explanation.
- --ee|----eexxppllaaiinn Print further explanations for diagnostics.
- Sometimes the reasons for diagnostics are not
- obvious and need further explanation.
+ --gg|----ggcccc--oouuttppuutt--ffoorrmmaatt
+ Use a format for the diagnostics that is understood
+ by most programs, especially editors, so they can
+ provide a point-and-goto interface.
- --gg|----ggcccc--oouuttppuutt--ffoorrmmaatt
- Use a format for the diagnostics that is under-
- stood by most programs, especially editors, so
- they can provide a point-and-goto interface.
+ --hh|----hheellpp Show the summary of command line options, then exit.
- --hh|----hheellpp Show the summary of command line options, then
- exit.
+ --ii|----iimmppoorrtt Check if a package is ready to be imported into
+ pkgsrc. This is especially useful for packages from
+ the pkgsrc-wip project.
- --ii|----iimmppoorrtt Check if a package is ready to be imported into
- pkgsrc. This is especially useful for packages
- from the pkgsrc-wip project.
+ --qq|----qquuiieett Don't print the errors and warnings summary before
+ terminating.
- --qq|----qquuiieett Don't print the errors and warnings summary
- before terminating.
+ --rr Check subdirectories, too. The subdirectories are
+ those that are mentioned in a `SUBDIR+=' line.
- --rr Check subdirectories, too. The subdirectories
- are those that are mentioned in a `SUBDIR+='
- line.
+ --ss|----ssoouurrccee For all diagnostics having file and line number
+ information, show the source code along with the
+ diagnostics.
- --ss|----ssoouurrccee For all diagnostics having file and line number
- information, show the source code along with
- the diagnostics.
+ --vv|----vveerrbboossee Be verbose. Show the progress report for items that
+ are being checked. If given more than once, debug-
+ ging messages are also shown.
- --vv|----vveerrbboossee Be verbose. Show the progress report for items
- that are being checked. If given more than
- once, debugging messages are also shown.
+ CChheecckkss
+ aallll Enable all checks.
- CChheecckkss
+ nnoonnee Disable all checks.
- aallll Enable all checks.
+ [[nnoo--]]AALLTTEERRNNAATTIIVVEESS Check the alternatives file.
- nnoonnee Disable all checks.
+ [[nnoo--]]IINNSSTTAALLLL Check the INSTALL and DEINSTALL scripts.
- [[nnoo--]]AALLTTEERRNNAATTIIVVEESS Check the alternatives file.
+ [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all included
+ files.
- [[nnoo--]]IINNSSTTAALLLL Check the INSTALL and DEINSTALL scripts.
+ [[nnoo--]]MMEESSSSAAGGEE Check MESSAGE files.
- [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all
- included files.
+ [[nnoo--]]PPLLIISSTT Check PLIST files.
- [[nnoo--]]MMEESSSSAAGGEE Check MESSAGE files.
+ [[nnoo--]]bbll33 Check buildlink3 Makefiles.
- [[nnoo--]]PPLLIISSTT Check PLIST files.
+ [[nnoo--]]ddiissttiinnffoo Check the distinfo file.
- [[nnoo--]]bbll33 Check buildlink3 Makefiles.
+ [[nnoo--]]eexxttrraa Check remaining files in the package directory.
- [[nnoo--]]ddiissttiinnffoo Check the distinfo file.
+ [[nnoo--]]mmkk Check Makefile fragments besides buildlink3.
- [[nnoo--]]eexxttrraa Check remaining files in the package directory.
+ [[nnoo--]]ppaattcchheess Check the pkgsrc specific patch files.
- [[nnoo--]]mmkk Check Makefile fragments besides buildlink3.
+ WWaarrnniinnggss
+ aallll Enable all warnings.
- [[nnoo--]]ppaattcchheess Check the pkgsrc specific patch files.
+ nnoonnee Disable all warnings.
- WWaarrnniinnggss
+ [[nnoo--]]aabbssnnaammee Warn if a file contains an absolute pathname.
- aallll Enable all warnings.
+ [[nnoo--]]ddiirreeccttccmmdd Warn if a system command name is used instead of a
+ variable (e.g. sed instead of ${SED}).
- nnoonnee Disable all warnings.
+ [[nnoo--]]eexxttrraa Emit some additional warnings that are not enabled by
+ default, for whatever reason.
- [[nnoo--]]aabbssnnaammee Warn if a file contains an absolute pathname.
+ [[nnoo--]]oorrddeerr Warn if Makefile variables are not in the preferred
+ order.
- [[nnoo--]]ddiirreeccttccmmdd Warn if a system command name is used instead
- of a variable (e.g. sed instead of ${SED}).
+ [[nnoo--]]pplliisstt--ddeepprr Warn if deprecated pathnames are used in _P_L_I_S_T files.
+ This warning is disabled by default.
- [[nnoo--]]eexxttrraa Emit some additional warnings that are not
- enabled by default, for whatever reason.
+ [[nnoo--]]pplliisstt--ssoorrtt Warn if items of a PLIST file are not sorted alpha-
+ betically. This warning is disabled by default.
- [[nnoo--]]oorrddeerr Warn if Makefile variables are not in the pre-
- ferred order.
+ [[nnoo--]]qquuoottiinngg Warn for possibly invalid quoting of make variables
+ in shell programs and shell variables themselves.
- [[nnoo--]]pplliisstt--ssoorrtt Warn if items of a PLIST file are not sorted
- alphabetically. This warning is disabled by
- default.
+ [[nnoo--]]ssppaaccee Emit notes for inconsistent use of white-space.
- [[nnoo--]]qquuoottiinngg Warn for possibly invalid quoting of make vari-
- ables in shell programs and shell variables
- themselves.
+ [[nnoo--]]ttyyppeess Warn for some _M_a_k_e_f_i_l_e variables if their assigned
+ values do not match their type.
- [[nnoo--]]ssppaaccee Emit notes for inconsistent use of white-space.
-
- [[nnoo--]]ttyyppeess Warn for some _M_a_k_e_f_i_l_e variables if their
- assigned values do not match their type.
-
- [[nnoo--]]vvaarroorrddeerr Warn if the variables in a package _M_a_k_e_f_i_l_es
- are not ordered in the way it is described the
- pkgsrc guide.
+ [[nnoo--]]vvaarroorrddeerr Warn if the variables in a package _M_a_k_e_f_i_l_es are not
+ ordered in the way it is described the pkgsrc guide.
OOtthheerr aarrgguummeennttss
@@ -169,16 +159,12 @@ DDIIAAGGNNOOSSTTIICCSS
(--vv). Their main use is to aid debugging.
AAUUTTHHOORRSS
- Jun-ichiro Itoh <itojun@itojun.org>
- Yoshishige Arai <ryo2@on.rim.or.jp>
Roland Illig <rillig@NetBSD.org>
- Many people have contributed patches and comments/suggestions.
-
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.
-pkgsrc January 20, 2006 pkgsrc
+NetBSD 3.0 February 18, 2006 NetBSD 3.0
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1
index 789c06f9150..6d0eae232f6 100644
--- a/pkgtools/pkglint/files/pkglint.1
+++ b/pkgtools/pkglint/files/pkglint.1
@@ -1,17 +1,17 @@
-.\" $NetBSD: pkglint.1,v 1.36 2006/01/20 13:33:37 rillig Exp $
+.\" $NetBSD: pkglint.1,v 1.37 2006/02/18 16:12:13 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>.
.\" All Rights Reserved. Absolutely no warranty.
.\"
.\" Roland Illig <roland.illig@gmx.de>, 2004, 2005.
-.\" Roland Illig <rillig@NetBSD.org>, 2005.
+.\" Roland Illig <rillig@NetBSD.org>, 2005, 2006.
.\"
-.Dd January 20, 2006
+.Dd February 18, 2006
.Dt PKGLINT 1
.Sh NAME
.Nm pkglint
-.Nd a verifier for pkgsrc directories
+.Nd static analyzer for pkgsrc packages
.Sh SYNOPSIS
.Nm pkglint
.Op Fl options
@@ -30,16 +30,13 @@ Packages following these rules are assumed to make future changes to the
pkgsrc infrastructure easier.
.Pp
.\" =======================================================================
-.Sy Options
-.Bl -tag -width 18n -offset indent
+.Ss Options
+.Bl -tag -width 18n
.It Fl C{[no-]check,...}
Enable or disable specific checks.
For a list of checks, see below.
.It Fl F Ns | Ns Fl -autofix
Repair trivial things automatically.
-Currently this only works for the synchronization of category
-.Pa Makefile Ns
-s.
.It Fl I
Show the
.Pa Makefile
@@ -95,8 +92,8 @@ If given more than once, debugging messages are also shown.
.El
.Pp
.\" =======================================================================
-.Sy Checks
-.Bl -tag -width 18n -offset indent
+.Ss Checks
+.Bl -tag -width 18n
.It Cm all
Enable all checks.
.It Cm none
@@ -124,8 +121,8 @@ Check the pkgsrc specific patch files.
.El
.Pp
.\" =======================================================================
-.Sy Warnings
-.Bl -tag -width 18n -offset indent
+.Ss Warnings
+.Bl -tag -width 18n
.It Cm all
Enable all warnings.
.It Cm none
@@ -140,6 +137,11 @@ Emit some additional warnings that are not enabled by default,
for whatever reason.
.It Cm [no-]order
Warn if Makefile variables are not in the preferred order.
+.It Cm [no-]plist-depr
+Warn if deprecated pathnames are used in
+.Pa PLIST
+files.
+This warning is disabled by default.
.It Cm [no-]plist-sort
Warn if items of a PLIST file are not sorted alphabetically.
This warning is disabled by default.
@@ -198,11 +200,7 @@ Informational messages are only written in verbose mode
Their main use is to aid debugging.
.El
.Sh AUTHORS
-.An Jun-ichiro Itoh Aq itojun@itojun.org
-.An Yoshishige Arai Aq ryo2@on.rim.or.jp
.An Roland Illig Aq rillig@NetBSD.org
-.Pp
-Many people have contributed patches and comments/suggestions.
.Sh BUGS
Many more checks could be added.
.Pp
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 75ca4d2e2bc..eff4b345058 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.526 2006/02/18 14:48:58 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.527 2006/02/18 16:12:13 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1123,6 +1123,7 @@ my $opt_warn_absname = true;
my $opt_warn_directcmd = true;
my $opt_warn_extra = false;
my $opt_warn_order = true;
+my $opt_warn_plist_depr = false;
my $opt_warn_plist_sort = false;
my $opt_warn_quoting = false;
my $opt_warn_space = false;
@@ -1133,6 +1134,7 @@ my (%warnings) = (
"directcmd" => [\$opt_warn_directcmd, "warn about use of direct command names instead of Make variables"],
"extra" => [\$opt_warn_extra, "enable some extra warnings"],
"order" => [\$opt_warn_order, "warn if Makefile entries are unordered"],
+ "plist-depr" => [\$opt_warn_plist_depr, "warn about deprecated paths in PLISTs"],
"plist-sort" => [\$opt_warn_plist_sort, "warn about unsorted entries in PLISTs"],
"quoting" => [\$opt_warn_quoting, "warn about quoting issues"],
"space" => [\$opt_warn_space, "warn about inconsistent use of white-space"],
@@ -1929,7 +1931,6 @@ sub determine_used_variables($) {
my ($rest);
foreach my $line (@{$lines}) {
- $line->log_debug(".");
$rest = $line->text;
while ($rest =~ s/(?:\$\{|defined\(|empty\()([0-9+.A-Z_a-z]+)[:})]//) {
my ($varname) = ($1);
@@ -4188,6 +4189,9 @@ sub checkfile_PLIST($) {
} elsif ($text =~ qr"^lib/locale/") {
$line->log_error("\"lib/locale\" must not be listed. Use \${PKGLOCALEDIR}/locale and set USE_PKGLOCALEDIR instead.");
+ } elsif ($text =~ qr"^share/doc/html/") {
+ $opt_warn_plist_depr and $line->log_warning("Use of \"share/doc/html\" is deprecated. Use \"share/doc/\${PKGBASE}\" instead.");
+
} elsif ($text =~ qr"^share/locale/") {
$line->log_warning("Use of \"share/locale\" is deprecated. Use \${PKGLOCALEDIR}/locale and set USE_PKGLOCALEDIR instead.");