pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Updated pkglint to 4.46.
details: https://anonhg.NetBSD.org/pkgsrc/rev/df7e86f052f1
branches: trunk
changeset: 503631:df7e86f052f1
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Nov 24 10:16:54 2005 +0000
description:
Updated pkglint to 4.46.
Changes since 4.45:
- Added the type ShellWord.
- Added quoting checks for variables that are appended to a
List of ShellWord.
- Multiple -v increase the verbosity.
- The --autofix option is no longer undocumented, but still experimental,
as this is the only part of pkglint that can modify external files.
- Added an --explain option that provides additional help for the
diagnostics.
- Added checks for unportable CPP macro names in patches.
- Updated the documentation.
diffstat:
doc/CHANGES | 3 +-
pkgtools/pkglint/Makefile | 4 +-
pkgtools/pkglint/files/pkglint.0 | 41 ++++++++++++++-----
pkgtools/pkglint/files/pkglint.1 | 49 ++++++++++++++++++-----
pkgtools/pkglint/files/pkglint.pl | 80 ++++++++++++++++++++++++++++++++++++--
5 files changed, 145 insertions(+), 32 deletions(-)
diffs (truncated from 364 to 300 lines):
diff -r 4fa1ec64b67d -r df7e86f052f1 doc/CHANGES
--- a/doc/CHANGES Thu Nov 24 10:08:00 2005 +0000
+++ b/doc/CHANGES Thu Nov 24 10:16:54 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.12029 2005/11/24 04:27:48 rh Exp $
+$NetBSD: CHANGES,v 1.12030 2005/11/24 10:17:25 rillig Exp $
Changes to the packages collection and infrastructure in 2005:
@@ -5383,3 +5383,4 @@
Updated audio/snd to 7.15 [wiz 2005-11-23]
Updated security/p5-Digest-SHA to 5.31 [wiz 2005-11-23]
Updated devel/Gorm to 1.0.1 [rh 2005-11-24]
+ Updated pkgtools/pkglint to 4.46 [rillig 2005-11-24]
diff -r 4fa1ec64b67d -r df7e86f052f1 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Thu Nov 24 10:08:00 2005 +0000
+++ b/pkgtools/pkglint/Makefile Thu Nov 24 10:16:54 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.308 2005/11/24 08:05:01 rillig Exp $
+# $NetBSD: Makefile,v 1.309 2005/11/24 10:16:54 rillig Exp $
#
-DISTNAME= pkglint-4.45.3
+DISTNAME= pkglint-4.46
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 4fa1ec64b67d -r df7e86f052f1 pkgtools/pkglint/files/pkglint.0
--- a/pkgtools/pkglint/files/pkglint.0 Thu Nov 24 10:08:00 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.0 Thu Nov 24 10:16:54 2005 +0000
@@ -19,13 +19,35 @@
--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
+ --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.
+
+ --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.
- --II Show the Makefile that is constructed by
- including all the files that are slurped in via
- .include directives. This flag is mainly for
- debugging.
+ --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a
+ list of warnings, see below.
+
+ --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 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.
--ii|----iimmppoorrtt Check if a package is ready to be imported into
pkgsrc.
@@ -33,9 +55,6 @@
--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 `|'.
-
--rr Check subdirectories, too. The subdirectories
are those that are mentioned in a `SUBDIR+='
line.
@@ -45,10 +64,8 @@
the diagnostics.
--vv|----vveerrbboossee Be verbose. Show the progress report for items
- that are being checked.
-
- --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a
- list of warnings, see below.
+ that are being checked. If given more than
+ once, debugging messages are also shown.
CChheecckkss
diff -r 4fa1ec64b67d -r df7e86f052f1 pkgtools/pkglint/files/pkglint.1
--- a/pkgtools/pkglint/files/pkglint.1 Thu Nov 24 10:08:00 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.1 Thu Nov 24 10:16:54 2005 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkglint.1,v 1.29 2005/11/20 20:09:35 rillig Exp $
+.\" $NetBSD: pkglint.1,v 1.30 2005/11/24 10:16:54 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>.
@@ -29,25 +29,49 @@
Packages following these rules are assumed to make future changes to the
pkgsrc infrastructure easier.
.Pp
+.\" =======================================================================
.Sy Options
.Bl -tag -width 18n -offset indent
.It Fl C{[no-]check,...}
Enable or disable specific checks.
For a list of checks, see below.
+.It Fl F 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
+that is constructed by including all the files that
+are slurped in via
+.Ql .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 V Ns | Ns Fl -version
+Print the current
+.Nm
+version number and exit.
+.It Fl W{[no-]warn,...}
+Enable or disable specific warnings.
+For a list of warnings, see below.
+.It Fl e Ns | Ns Fl -explain
+Print further explanations for diagnostics.
+Sometimes the reasons for diagnostics are not obvious and need further
+explanation.
+.It Fl g Ns | Ns Fl -gcc-output-format
+Use a format for the diagnostics that is understood by most programs,
+especially editors, so they can provide a point-and-goto interface.
.It Fl h Ns | Ns Fl -help
Show the summary of command line options, then exit.
-.It Fl I
-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 i Ns | Ns Fl -import
Check if a package is ready to be imported into pkgsrc.
.It Fl q Ns | Ns Fl -quiet
Don't print the errors and warnings summary before terminating.
-.It Fl R Ns | Ns Fl -rcsidstring
-Allow other RCS Id strings than NetBSD.
-Multiple strings may be concatenated with
-.Ql | .
.It Fl r
Check subdirectories, too.
The subdirectories are those that are mentioned in a
@@ -59,11 +83,10 @@
.It Fl v Ns | Ns Fl -verbose
Be verbose.
Show the progress report for items that are being checked.
-.It Fl W{[no-]warn,...}
-Enable or disable specific warnings.
-For a list of warnings, see below.
+If given more than once, debugging messages are also shown.
.El
.Pp
+.\" =======================================================================
.Sy Checks
.Bl -tag -width 18n -offset indent
.It Cm all
@@ -92,6 +115,7 @@
Check the pkgsrc specific patch files.
.El
.Pp
+.\" =======================================================================
.Sy Warnings
.Bl -tag -width 18n -offset indent
.It Cm all
@@ -113,6 +137,7 @@
their type.
.El
.Pp
+.\" =======================================================================
.Sy Other arguments
.Bl -tag -width 18n -offset indent
.It Ar dir ...
diff -r 4fa1ec64b67d -r df7e86f052f1 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Nov 24 10:08:00 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Nov 24 10:16:54 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.382 2005/11/24 08:46:34 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.383 2005/11/24 10:16:54 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -32,13 +32,16 @@
#==========================================================================
# This package is a catch-all for subroutines that are not application-spe-
# cific. Currently it contains the boolean constants C<false> and C<true>,
-# as well as a function to print text in a table format.
+# as well as a function to print text in a table format, and a function
+# that converts an array into a hash. The latter is just for convenience
+# because I don't know of a Perl operator similar to qw() that can be used
+# for creating a hash.
#==========================================================================
BEGIN {
use Exporter;
use vars qw(@ISA @EXPORT_OK);
@ISA = qw(Exporter);
- @EXPORT_OK = qw(false print_table true);
+ @EXPORT_OK = qw(array_to_hash false print_table true);
}
use constant false => 0;
@@ -72,6 +75,15 @@
}
}
+sub array_to_hash(@) {
+ my ($result) = {};
+
+ foreach my $arg (@_) {
+ $result->{$arg} = 1;
+ }
+ return $result;
+}
+
#== End of PkgLint::Util ==================================================
package PkgLint::Logging;
@@ -100,8 +112,9 @@
@EXPORT_OK = qw(
NO_FILE NO_LINE_NUMBER
log_fatal log_error log_warning log_note log_info log_debug
+ explain
print_summary_and_exit set_verbosity get_verbosity
- set_gcc_output_format
+ set_explain set_gcc_output_format
get_show_source_flag set_show_source_flag
);
import PkgLint::Util qw(
@@ -116,6 +129,7 @@
my $warnings = 0;
my $verbosity = 0;
my $gcc_output_format = false;
+my $explain_flag = false;
my $show_source_flag = false;
sub log_message($$$$$) {
@@ -190,6 +204,14 @@
}
}
+sub explain($$$) {
+ my ($file, $lines, $msg) = @_;
+
+ if ($explain_flag) {
+ print STDOUT ("\t${msg}\n");
+ }
+}
+
sub print_summary_and_exit($) {
my ($quiet) = @_;
@@ -214,6 +236,9 @@
($verbosity) = @_;
}
+sub set_explain() {
+ $explain_flag = true;
+}
sub set_gcc_output_format() {
$gcc_output_format = true;
}
@@ -328,6 +353,10 @@
}
PkgLint::Logging::log_debug($self->[FILE], $self->[LINES], $text);
}
+sub explain($$) {
+ my ($self, $text) = @_;
+ PkgLint::Logging::explain($self->[FILE], $self->[LINES], $text);
+}
sub to_string($) {
my ($self) = @_;
@@ -573,7 +602,7 @@
BEGIN {
import PkgLint::Util qw(
- false true
+ array_to_hash false true
);
Home |
Main Index |
Thread Index |
Old Index