Bug#467444: libpdf-api2-perl: PDF::API2::Outline.3pm and PDF::API2::Page.3pm are broken

Colin Watson cjwatson at debian.org
Thu Feb 28 10:53:11 UTC 2008


tags 467476 fixed-upstream
thanks

On Mon, Feb 25, 2008 at 11:11:51AM -0800, Russ Allbery wrote:
> This is a case where I think that man-db's whatis parsing is
> insufficiently smart.  pod2man generates an .ie construct for some .SH
> headings because of a Solaris nroff bug, specifically:
[...]
> The result is that the start of these man pages looks like:
> 
> .SH "NAME"
> PDF::API2::Page \- page management
> .ie n .SH "$page\fP = PDF::API2::Page\->new \f(CW$pdf\fP, \f(CW$parent\fP, \f(CW$index"
> .el .SH "\f(CW$page\fP = PDF::API2::Page\->new \f(CW$pdf\fP, \f(CW$parent\fP, \f(CW$index\fP"
> 
> However, man-db's whatis parsing is confused by this construct.
> 
> Ideally, I think it should be made intelligent enough to recognize .ie and
> realize that there's an .SH there along either branch of the conditional,
> and therefore the NAME section is ended.  Failing that, I think it would
> make sense to terminate whatis parsing at the first nroff directive (line
> starting with .) after the .SH NAME, given that in practice nroff
> directives don't work inside NAME sections anyway.

In theory I agree that lexgrog should parse conditionals and try both
branches. In practice I suspect doing that in lex will be horrifically
painful! I've gone for the second option, and just made it terminate
whatis parsing at conditionals:

Thu Feb 28 10:47:22 GMT 2008  Colin Watson  <cjwatson at debian.org>

        * src/lexgrog.l: Terminate MAN_NAME at .ie or .if conditionals
          (Debian bug #467444).

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]





More information about the pkg-perl-maintainers mailing list