guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: guix: Index the man-db database via man pages nam


From: guix-commits
Subject: branch master updated: guix: Index the man-db database via man pages names.
Date: Wed, 02 Mar 2022 00:25:50 -0500

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new deaa322963 guix: Index the man-db database via man pages names.
deaa322963 is described below

commit deaa322963bc06b820e82d5945e6c496ac6bedf1
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Mar 1 23:51:12 2022 -0500

    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.
---
 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<?))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]