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


Justin Pryzby wrote:

>I still don't know anything about info format, but I just looked at
>/usr/share/info/cppinternals.info.gz, which has, on line 5:
>  * cppinternals-4.0: (cppinternals-4.0).      Cpplib internals.
>  sed -e '5s/^/START-INFO-DIR-ENTRY\n* cppinternals-4.0: (cppinternals-4.0).      Cpplib internals.\nEND-INFO-DIR-ENTRY\n/'
Oh, I know how to add a line using sed. I'm just afraid that something
in this change, not being context aware, will break in some future
pacakge (i.e. - 5 will sieze to be the correct line number to add the
section at). In order to do context I need awk, and I don't know awk
well enough.

In any case, I believe I found a clean(er) solution.

>Maybe this isn't the right solution .. but hopefully a start.
>Have you looked at the package: linuxdoc-tools-info?
Yes. I even downloaded the source package and greped
"START-INFO-DIR-ENTRY" over the entire thing. Nothing. I made a search
over my installed system, looking for any info file generated using
linux-doc. Nothing. It seems that upstream made an ... uncomfertable
choice of SGML language.

The solution is this (so that the web archives have it):
The demand for the problematic line is by the postinst script, that
tries to register the info files in the system. This is the
"install-info" command. RTFM on install-info shows that it will look for
the "START-INFO-DIR-ENTRY" in the file, and if not found, will look for
"This file documents...". If neither is found, it is an error *unless*
you specify the --description option.

The "install-info" command, in turn, is generated by dh_installinfo. I
(will - not done it yet) switch to "dh_installinfo -n", and put the
command it generated manually into postinst and prerm. I will then add
"--description" to install-info manually.

Pros: This is insensitive to changes to upstream source. Even if the
info file changes, I don't need to track it closely for this solution to
remain correctly.

Cons: I lose the automatic nature of debhelper.

I think this is the best solution to this problem at this time. I will
also try to get upstream to change the phrasing to "This page
documents...", but that will take a little longer.

Thanks for everyone's help,

Reply to: