Quote:
Originally Posted by MadMaverick9
@Mancha - Thank you for that patch.
|
You're very welcome.
Quote:
Originally Posted by MadMaverick9
@Mancha: Interestingly "pm-suspend" does not show up in the "man -k pm-" listing...Could "-o \( -type l -xtype f \)" safely be added here or would that cause other problems?
|
Good find. Unfortunately, crawling symlinks with Slackware's makewhatis might cause more heartache than it solves. Unless you overhaul its
awk logic, you'll end up with a much larger whatis db and redundant apropos/whatis output.
For example, if
/usr/man/man1/B.1.gz points to
/usr/man/man1/A.1.gz and A's manpage has:
Code:
NAME
A, B - the winner takes it all
you'll end up with the following in your whatis database (sorted differently):
Code:
A 1 - the winner takes it all
B [A] 1 - the winner takes it all
B 1 - the winner takes it all
A [B] 1 - the winner takes it all
Normally you'd only have the first two. Big problem when projects combine many commands into one manpage and symlink (e.g. OpenSSL).
I continued squashing bugs in makewhatis' awk parser until it became clear I was re-arranging deck chairs on the Titanic. Full stop.
At some point Slackware might switch to a more robust alternative but, until then, I've put together build materials for a package I'm
calling
man-db-lite (based on man-db). It provides apropos-ng and whatis-ng (that gracefully co-exist with Slackware's man utils) and
makewhatis-ng (small script that produces a whatis db usable by Slackware's apropos, whatis, etc.).
Install the package and create a new Slackware whatis database:
Afterwards, Slackware's apropos and whatis work as usual though you'll notice a slightly different format. I personally find the format
cleaner and easier to read.
The issues identified so far seem to all be dealt with well by man-db, e.g.
Code:
$ apropos pm-suspend
pm-suspend (8) - Suspend or Hibernate your computer
pm-suspend-hybrid (8) - Suspend or Hibernate your computer
You can use the -ng versions of apropos and whatis to take advantage of richer features (see their manpages for more details).
--mancha