tags 377382 -patch
retitle 377382 [manpages] check for undefined macros
thanks

> Checking the validity with the "man" command does not report errors
> about macros. The workaround is to use "groff -wmac".
> 
> The result of a wrong macro is often a missing line in the displayed
> manpage. For example, shmget.2 (manpages-dev) contains the undefined
> macro ".Br proc (5)." instead of ".BR proc (5)". If you have a look at
> the displayed manpage, you will see that "proc(5)." is missing at the
> end of the following sentence:
>  "See also the discussion of the file /proc/sys/vm/overcommit_memory in"
> 
> The attached patch should allow lintian to warn about these problems.

Unfortunately, there are reasons why we're using man -l other than that it
knows what formatter to run.  It also processes .so inclusions of
compressed files, and contrary to the comment, I'm afraid those *aren't*
checked elsewhere.  Only the simple ones are.  Basically, this patch would
revert the fix for #349614.

It's also not okay to run system commands from inside lintian with simple
backticks; you have to clear the environment first, or weird things can
happen (users with CDPATH set in the environment are a common problem).

I poked at this patch for about an hour, and I can't find a way of fixing
those issues that I'm very happy with.  I suppose we could run all man
pages through both man -l and then through groff just to check for macros,
but I'm also worried that undefined macros are sometimes used
intentionally for optional parsing (the bash man pages, for instance) and
we're leaving people without a recourse other than an override.  Although
maybe that's not too bad....

I'm going to remove the patch tag from this one since I don't think it
should be applied as-is, but if you come up with an improved patch, please
let us know.

-- 
Russ Allbery ([EMAIL PROTECTED])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to