aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-09-30 09:18:03 +0000
committerLudovic Courtès <ludo@gnu.org>2024-09-30 20:52:23 +0000
commit210bbf9a391612a4e28883a288168d9a23fe66b9 (patch)
treeb7bf80b215ee806e062d118b0998cfbd5eaf5563
parentd057d59170446fe47ddedd7eb281ca2a1dfc05e9 (diff)
downloadguix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar.gz
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar.bz2
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar.lz
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar.xz
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.tar.zst
guix-210bbf9a391612a4e28883a288168d9a23fe66b9.zip
man-db: Correctly resolve man page links.
Fixes <https://issues.guix.gnu.org/73259>. Fixes a bug introduced in 822455580273ea8b3c1059922e2b41a395103164 whereby a link such as “.so man1/bzdiff.1” would resolve to the file that contains the link (in this case ‘bzcmp.1.zst’), as opposed to the actual link target. As a result, ‘man-page->entry’ would recurse, reopening the man page that contains the link until file descriptor exhaustion. * guix/man-db.scm (mandb-entries): In second argument to ‘man-page->entry’, return either FILE-GZ or FILE-ZST, but not FILE. Change-Id: I06a7a6905a98524efc889a18e81352bf9eec5743
-rw-r--r--guix/man-db.scm5
1 files changed, 2 insertions, 3 deletions
diff --git a/guix/man-db.scm b/guix/man-db.scm
index 9cb07493ba..bba90ed473 100644
--- a/guix/man-db.scm
+++ b/guix/man-db.scm
@@ -223,7 +223,6 @@ for it."
".gz"))
(file-zst (string-append directory "/" link
".zst")))
- (and (or (file-exists? file-gz)
- (file-exists? file-zst) file)
- file)))))
+ (or (and (file-exists? file-gz) file-gz)
+ (and (file-exists? file-zst) file-zst))))))
(man-files directory)))