mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
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.
This commit is contained in:
parent
cda78ec8ac
commit
deaa322963
1 changed files with 6 additions and 1 deletions
|
@ -110,7 +110,12 @@ (define (write-mandb-database file entries)
|
|||
;; 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<?))
|
||||
|
|
Loading…
Reference in a new issue