Hello dear people,
yesterday I wanted to read the Info manual for diff, and got a bit hung up on the way. While typing `info diff` in a terminal brings up the manual, in Emacs chording `C-h i m diff` results in the error message "Info file diff does not exist". The culprit is an entry in /usr/info/dir that names the respective info file as "diff". (The first line here:)
Code:
$ grep '(diff' /usr/info/dir
* Diff: (diff). Comparing and merging files.
* cmp: (diffutils)Invoking cmp. Compare 2 files byte by byte.
* diff: (diffutils)Invoking diff. Compare 2 files line by line.
* diff3: (diffutils)Invoking diff3. Compare 3 files line by line.
* patch: (diffutils)Invoking patch. Apply a patch to a file.
* sdiff: (diffutils)Invoking sdiff. Merge 2 files side-by-side.
Comparing and merging files.
E.g. by typing diff3 instead of diff, I can get to the manual.
I don't remember at which Slackware version I last did a clean install, as opposed to an upgrade, but
Code:
$ grep '^usr/info/d' /var/log/removed_packages/diffutils-*
diffutils-3.0-x86_64-1-upgraded-2012-11-08,15:00:47:usr/info/diff.info.gz
diffutils-3.2-x86_64-1-upgraded-2013-11-18,20:39:36:usr/info/diffutils.info.gz
diffutils-3.3-x86_64-1-upgraded-2016-08-17,19:13:05:usr/info/diffutils.info.gz
So I started looking into how this dir file is modified upon installation, and found it is by calling `install-info` in doinst.sh (logically).
I did not find any documentation on what happens on package removal with regards to the doinst.sh, besides the note at the bottom of the
doinst.sh SBo template: "When upgradepkg is used, doinst.sh gets run twice. So don't put anything here that takes a long time to run." If anyone knows of such documentation, please point me there.
So, I suspect there is some magic in `removepkg` to deal with doinst.sh, but did it (a) fail only for me or is it (b) generally not equipped to handle changing names of the info files of a package, or (c) doesn't remove listings from the dir file at all?
In case (a) I would just remove the line in my `dir` file and be done with it.
In case (b), I see that you ideally would need to call `install-info --remove` with the
old info file as an argument.
That's all, folks