From deaa322963bc06b820e82d5945e6c496ac6bedf1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 1 Mar 2022 23:51:12 -0500 Subject: guix: Index the man-db database via man pages names. Fixes . * guix/man-db.scm (write-mandb-database): Use the abbreviated base name of the man page as the key, not its full file name. --- guix/man-db.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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