From 210bbf9a391612a4e28883a288168d9a23fe66b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 30 Sep 2024 11:18:03 +0200 Subject: man-db: Correctly resolve man page links. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . 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 --- guix/man-db.scm | 5 ++--- 1 file 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))) -- cgit v1.2.3