This is a discussion on updating info files within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello, Can someone tell me how to update the main entry of the info-files ? At this time, when ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, Can someone tell me how to update the main entry of the info-files ? At this time, when I type an 'info foo', I only get the related man page in the info screen. I see that most packages add their info-files in /usr/info, but I don't understand anything at install-info and related stuff. Is it necessary to update BY HAND (!!!) the /usr/info/dir file every time you add a package ? I hope it isn't... I've missed something ? Thanks in advance, -- ^^ Gauthier (_____/°°-ç | \_`-" )/@mmm|| \nn \nn FOE-Belgium : http://www.amisdelaterre.be |
| |||
| On 15 Aug 2004 17:51:15 GMT, Gauthier <alouest.du.soleil@NOSPAM_skynet.be> wrote: > > I see that most packages add their info-files in /usr/info, but I don't > understand anything at install-info and related stuff. > Is it necessary to update BY HAND (!!!) the /usr/info/dir file > every time you add a package ? I don't know info very well, but it looks like you can do the following to list the /usr/info files in /usr/info/dir: # for i in /usr/info/*.gz ; do install-info $i /usr/info/dir; done HTH. -- Mark Hill Email (Just for Fun): echo -e "\x6D\x72\x68\x69\x6C\x6C\x40\x67\x6D\ \x61\x69\x6C\x2E\x63\x6F\x6D" |
| |||
| * Gauthier <alouest.du.soleil@NOSPAM_skynet.be> writes: > Can someone tell me how to update the main entry of the info-files ? install-info --info-dir=/usr/info --info-file=/usr/info/foo.info.gz Will do it most times. Note that install-info(1) does *NOT* copy or move any files anywhere. It is purely for add/removing entries from the info `dir' file(s). The above command will fail if the info document you are trying to add to the dir index isn't formatted correctly. The info file (or the first one if there are a number of them, eg, foo.info, foo.info-1, foo.info-2) needs to contain a stanza similar to... ,----[ bash.info ] | INFO-DIR-SECTION Basics | START-INFO-DIR-ENTRY | * Bash: (bash). The GNU Bourne-Again SHell. | END-INFO-DIR-ENTRY `---- But all is not lost if this stanza doesn't exist because you can specify the entries explicitly on the install-info(1) command line (see the `--entry=' and `--section=' options). > At this time, when I type an 'info foo', I only get the related man page > in the info screen. I've found that you need to ensure the following for having a well managed set of info documents... o Only have a single `dir' file and keep it in /usr/info o Set the environment variable $INFOPATH to include _all_ the info directories on your system (you'll be surprised how many you have)... find / -type d -name info 2> /dev/null o Understand that many people have no idea what they are doing when it comes to writing Texinfo docs. (lots of info files don't have that "dir stanza") > I see that most packages add their info-files in /usr/info, but I don't > understand anything at install-info and related stuff. > Is it necessary to update BY HAND (!!!) the /usr/info/dir file > every time you add a package ? When I'm making a Slackware package I'll add a install-info command to the end of the `install/doinst.sh'. IMO makepkg(8) should be extended to do this automatically, as far as I know, it doesn't. I've found that even official Slackware packages from slackware.com don't always handle info properly. -- |---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---| | Genius - Is the ability to reduce | | the complicated to the simple | |----------------------------------<steve@youngs.au.com>---| |
| |||
| Le 15 Aug 2004 21:21:28 GMT, Mark Hill <mrhill@gmail.com> a écrit: > I don't know info very well, but it looks like you can do the following > to list the /usr/info files in /usr/info/dir: > > # for i in /usr/info/*.gz ; do install-info $i /usr/info/dir; done > > HTH. Thanks, but I suggest after testing to use #for i in /usr/info/*info.gz because info-documentations are generally made of an introduction/index called foo.info.gz and other files called foo.info-1.gz and so. I think it must be avoided to include the numbered files in /usr/info/dir -- ^^ Gauthier (_____/°°-ç | \_`-" )/@mmm|| \nn \nn FOE-Belgium : http://www.amisdelaterre.be |
| ||||
| Le Mon, 16 Aug 2004 10:16:55 +1000, Steve Youngs <steve@youngs.au.com> a écrit: > > install-info --info-dir=/usr/info --info-file=/usr/info/foo.info.gz > > Will do it most times. Thanks a lot for such extended explanations. I've just seen that the option --info-file= is not valid (in any case with the version of install-info I use) : install-info: unknown option `--info-file=/usr/info/foo.info.gz' Just the name of the file must be used By the way, I had meanwhile downloaded the sources of texinfo and found in it a contribution called gen-dir-node : #!/bin/sh # $Id: gen-dir-node,v 1.1.1.1 2003/12/06 01:35:48 karl Exp $ # Generate the top-level Info node, given a directory of Info files # and (optionally) a skeleton file. The output will be suitable for a # top-level dir file. The skeleton file contains info topic names in the # order they should appear in the output. There are three special # lines that alter the behavior: a line consisting of just "--" causes # the next line to be echoed verbatim to the output. A line # containing just "%%" causes all the remaining filenames (wildcards # allowed) in the rest of the file to be ignored. A line containing # just "!!" exits the script when reached (unless preceded by a line # containing just "--"). Once the script reaches the end of the # skeleton file, it goes through the remaining files in the directory # in order, putting their entries at the end. The script will use the # ENTRY information in each info file if it exists. Otherwise it will # make a minimal entry. -- ^^ Gauthier (_____/°°-ç | \_`-" )/@mmm|| \nn \nn FOE-Belgium : http://www.amisdelaterre.be |
| Thread Tools | |
| Display Modes | |
|
|