diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-03-01 23:51:12 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-03-02 00:00:55 -0500 |
commit | deaa322963bc06b820e82d5945e6c496ac6bedf1 (patch) | |
tree | 47ea9a580f90981482ee6fa60ef1e2366dbe94e8 /guix/man-db.scm | |
parent | cda78ec8ac30670c5394f55f92d4a67c286b2575 (diff) |
guix: Index the man-db database via man pages names.
Fixes <https://issues.guix.gnu.org/38838>.
* guix/man-db.scm (write-mandb-database): Use the abbreviated base name of the
man page as the key, not its full file name.
Diffstat (limited to 'guix/man-db.scm')
-rw-r--r-- | guix/man-db.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/man-db.scm b/guix/man-db.scm index a6528e4431..7d9707a592 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -110,7 +110,12 @@ ;; Write ENTRIES in sorted order so we get deterministic output. (for-each (lambda (entry) (gdbm-set! db - (string-append (mandb-entry-file-name entry) + ;; For the 'whatis' tool to find anything, the key + ;; should match the name of the software, + ;; e.g. 'cat'. Derive it from the file name, as + ;; the name could technically be #f. + (string-append (abbreviate-file-name + (mandb-entry-file-name entry)) "\x00") (entry->string entry))) (sort entries mandb-entry<?)) |