[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#450432: ... and even more bugs like this?



>>>>> "CW" == Colin Watson <cjwatson@debian.org> writes:

 >> What I'm expected to do, then?  (With respect to Debian BTS.)  I
 >> believe, start filing multiple bug reports would be a bad idea (for
 >> me now.)  May I suggest an explicit warning to be generated by Groff
 >> on unknown ``command'', so that lintian(1) will issue a warning on a
 >> malformed manual page, too?  (Or a ``strict check'' mode for Groff,
 >> to be used especially by lintian and alike?)

 > The -wmac option to groff will emit a warning for this mistake.

	Today, I've found it, too.

 > See the "Warnings" node in 'info groff'.

	... I've done it the hard way -- looked through the source.

 > It's not especially easy right now to make Lintian pass this, since
 > man doesn't expose an interface to add extra options to groff.

	And here goes another hack:

$ cat man.local 
.warn 512
.mso /usr/share/groff/site-tmac/man.local
$ cat mdoc.local 
.warn 512
.mso /usr/share/groff/site-tmac/mdoc.local
$ LC_ALL=C GROFF_TMAC_PATH="$PWD" man ifconfig > /dev/null 
Reformatting ifconfig(8), please wait...
/tmp/zman6d1c0O:63: warning: `Note:' not defined
$ LC_ALL=C GROFF_TMAC_PATH="$PWD" \
      man gpg ocamldoc rpost sfxtest v.surf.rst > /dev/null 
Reformatting gpg(1), please wait...
/tmp/zmanqItyHp:153: warning: `-'' not defined
/tmp/zmanqItyHp:1449: warning: `GPG_AGENT_INFO'' not defined
/tmp/zmanqItyHp:1450: warning: `This' not defined
Reformatting ocamldoc(1), please wait...
/tmp/zmanGibSgq:109: warning: `The' not defined
Reformatting rpost(1), please wait...
/tmp/zmanq2L13v:96: warning: `If' not defined
Reformatting sfxtest(1), please wait...
/tmp/zman8dcg6e:87: warning: `Higher' not defined
Reformatting v.surf.rst(1grass), please wait...
/tmp/zmaneiehzB:130: warning: `User' not defined
$ 

	How about adding this one to lintian?

 > I'll file a bug for my own reference and see about adding one.

	Yes, please.

[...]

 >> #!/bin/bash
 >> ### check-man-periods.sh --- Check man pages for ``period bugs''  -*- Sh -*-

 > I very much recommend against any attempt to parse *roff in shell,
 > FWIW.  Even man-db's flex parser is ultimately doomed to failure and
 > should probably be replaced with something cunning involving custom
 > groff macros at some point.

	Agreed upon that.



Reply to: