Bug#285540: lintian: man page syntax checking with "man -l file"
Package: lintian
Version: 1.23.4
Severity: wishlist
Tags: patch
It'd be nice if lintian could check that man pages get through man
successfully. I've noticed a few with typos which would be picked up
with this. Patches below for checks/manpages and manpages.desc.
There's quite a lot of pages with latin1 in them which provoke
warnings. Maybe man should accept them, but for now they result in
missing characters and so I think justify a lintian warning.
Problems with "adjust" and "break" won't lose any output, I think, but
it's annoying to see complaints from man, so it's worth lintian
reporting them. (Some attention to the formatting directives can
probably produce better looking output.)
Without picking on any particular packages, some samples for this
check:
sysvinit 2.86-5 typos in pidof.8 and bootlogd.8
apt 0.5.27 adjust problem in apt_preferences.5
groff 1.18.1.1-4 latin1 in mmroff (resulting in characters missing
from the author's name, in LANG=C at least)
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.8-1-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages lintian depends on:
ii binutils 2.15-5 The GNU assembler, linker and bina
ii diffstat 1.35-1 produces graph of changes introduc
ii file 4.12-1 Determines file type using "magic"
ii gettext 0.14.1-6 GNU Internationalization utilities
ii intltool-debian 0.30+20040213 Help i18n of RFC822 compliant conf
ii man-db 2.4.2-19 The on-line manual pager
ii perl [libdigest-md5-perl] 5.8.4-4 Larry Wall's Practical Extraction
-- no debconf information
--- manpages.old 2004-07-05 10:20:56.000000000 +1000
+++ manpages 2004-12-14 09:07:25.000000000 +1100
@@ -232,6 +232,16 @@
tag "manpage-has-bad-whatis-entry", "$file";
}
}
+ # If it's not a .so link, run it through "man" to check for errors.
+ open(MANERRS,"(man -l unpacked/\Q$file\E >/dev/null) 2>&1 |")
+ or fail("cannot run man -l: $!");
+ while (<MANERRS>) {
+ # ignore progress information from man
+ if (/^Reformatting/) { next; }
+ tag "manpage-has-errors-from-man", "$file";
+ last;
+ }
+ close(MANERRS);
# Now we search through the whole man page for some common errors
my $lc = 0;
my $hc = 0;
--- manpages.desc.old 2004-10-13 09:48:49.000000000 +1000
+++ manpages.desc 2004-12-14 09:00:34.000000000 +1100
@@ -95,6 +95,28 @@
See also groff_man(7) and groff_mdoc(7) for general information on writing
manual pages.
+Tag: manpage-has-errors-from-man
+Type: warning
+Info: This man page provokes warnings or errors from man, you can see them
+ on stderr with "man -l filename >/dev/null".
+ .
+ "cannot adjust" or "can't break" are trouble with paragraph filling,
+ usually related to long lines. Adjustment can be helped by left
+ justifying, breaks can be helped with hyphenation, see "Manipulating
+ Filling and Adjusting" and "Manipulating Hyphenation" in the manual.
+ .
+ "can't find numbered character" usually means latin1 etc in the input, and
+ this warning indicates characters will be missing from the output. You can
+ change to escapes like \[:a] described on the groff_char man page.
+ .
+ Other warnings are often formatting typos, like missing quotes around a
+ string argument to .IP. These are likely to result in lost or malformed
+ output. See the groff_man (or groff_mdoc if using mdoc) man page for
+ information on macros.
+ .
+ At worst, warning messages can be disabled with the .warn directive, see
+ "Debugging" in the groff manual.
+
Tag: manpage-for-x11-binary-in-wrong-directory
Type: error
Info: Manual pages for binaries which are located in <tt>/usr/X11R6/bin</tt>
Reply to: