lintian: r721 - in trunk: debian frontend man
Author: rra
Date: 2006-08-19 07:43:10 +0200 (Sat, 19 Aug 2006)
New Revision: 721
Modified:
trunk/debian/changelog
trunk/frontend/lintian-info
trunk/man/lintian-info.1
Log:
* frontend/lintian-info:
+ [RA] Add the -t or --tags option that, given a tag name, prints out
the description. (Closes: #376109)
* man/lintian-info.1:
+ [RA] Document the new -t or --tags option.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-08-19 05:21:59 UTC (rev 720)
+++ trunk/debian/changelog 2006-08-19 05:43:10 UTC (rev 721)
@@ -76,6 +76,10 @@
* debian/copyright:
+ [RA] Add Subversion repository location.
+ * frontend/lintian-info:
+ + [RA] Add the -t or --tags option that, given a tag name, prints out
+ the description. (Closes: #376109)
+
* lib/Tags.pm:
+ [RA] If a tag has been overriden via any mechanism, do not add it to
any of the statistics (tag, severity, or significance). Before, the
@@ -89,8 +93,10 @@
+ [RA] Better document the --archivedir and --dist options and how
lintian constructs the path to an archive. (Closes: #383203)
+ [RA] Document new version-substvars check script.
+ * man/lintian-info.1:
+ + [RA] Document the new -t or --tags option.
- -- Russ Allbery <rra@debian.org> Fri, 18 Aug 2006 21:43:33 -0700
+ -- Russ Allbery <rra@debian.org> Fri, 18 Aug 2006 22:41:30 -0700
lintian (1.23.22) unstable; urgency=low
Modified: trunk/frontend/lintian-info
===================================================================
--- trunk/frontend/lintian-info 2006-08-19 05:21:59 UTC (rev 720)
+++ trunk/frontend/lintian-info 2006-08-19 05:43:10 UTC (rev 721)
@@ -22,6 +22,8 @@
use strict;
+use Getopt::Long;
+
# turn file buffering off:
$| = 1;
@@ -40,6 +42,32 @@
my %tag_info = %{read_tag_info()};
+my ($tags);
+Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev');
+GetOptions('tags|t' => \$tags)
+ or die("error parsing options\n");
+
+# If tag mode was specified, read the arguments as tags and display the
+# descriptions for each one. (We don't currently display the severity,
+# although that would be nice.)
+my $unknown;
+if ($tags) {
+ for my $tag (@ARGV) {
+ print "N: $tag\n";
+ print "N:\n";
+ if (exists $tag_info{$tag}) {
+ print wrap_paragraphs('N: ', $tag_info{$tag});
+ } else {
+ print "N: Unknown tag.\n";
+ $unknown = 1;
+ }
+ print "N:\n";
+ }
+ exit ($unknown ? 1 : 0);
+}
+
+# Otherwise, read input files or STDIN, watch for tags, and add descriptions
+# whenever we see one, can, and haven't already explained that tag.
while (<>) {
print;
chomp;
Modified: trunk/man/lintian-info.1
===================================================================
--- trunk/man/lintian-info.1 2006-08-19 05:21:59 UTC (rev 720)
+++ trunk/man/lintian-info.1 2006-08-19 05:43:10 UTC (rev 721)
@@ -15,7 +15,7 @@
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
.\" USA
.\"
-.TH LINTIAN-INFO 1 "March 1, 1998" "Debian GNU/Linux"
+.TH LINTIAN-INFO 1 "August 16, 2006" "Debian GNU/Linux"
.if n .ad l
.nh
@@ -27,14 +27,20 @@
.RI [ log-file ]
\&...
+.B lintian-info \-\-tags
+.I tag
+\&...
+
.SH DESCRIPTION
.PP
The
.B lintian-info
-command parses the output of the
+command either parses the output of the
.B lintian
command and gives verbose information about the listed Lintian error
-tags.
+tags or (if given the
+.BR \-t " or " \-\-tags
+option) explains a given tag or tags.
.sp
If no log-file is specified on the command line, this command expects
its input on stdin. Thus, the output of
@@ -51,9 +57,18 @@
.BR lintian-info .
Thus, you will rarely use this command directly.)
+.SH OPTIONS
+.TP
+.BR \-t ", " \-\-tags
+Rather than treating them as log file names, treat any command-line
+options as tag names and display the descriptions of each tag.
+
.SH EXIT STATUS
.PP
-This command always returns with exit code 0.
+If
+.BR \-t " or " \-\-tags
+was given and one or more of the tags specified were unknown, this command
+returns the exit code 1. Otherwise, it always returns with exit code 0.
.SH SEE ALSO
.BR lintian (1)
Reply to: