guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] profiles: Generate database file for manpages


From: Ludovic Courtès
Subject: Re: [PATCH] profiles: Generate database file for manpages
Date: Sat, 01 Apr 2017 00:44:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Maxim,

Maxim Cournoyer <address@hidden> skribis:

> Unfortunately some of the simplifications you made appear to break it
> :). I've tried your reworked patch and got the same result as you (no
> result found except when using man -K). When I use the original patch it
> works as I originally described.

Oops.

>> +        (define (populate-manpages-collection-dir entries)
>> +          (let ((manpages (append-map find-files entries)))
>> +            (for-each (lambda (manpage)
>> +                        (let* ((dest-file (string-append
>> +                                           manpages-collection-dir "/"
>> +                                           (strip-store-file-name 
>> manpage))))
>
> Unfortunately we cannot simply use strip-store-file-name, since what
> mandb expects to find in our manpages-collection-dir is a collection of
> subdirectories such as man1, man3, man7, etc. such as would be found
> under "/usr/share/man" on a traditional distro. This change instead
> makes it look like:
>
> bazaar-2.7.0/          gdbm-1.12/              libxau-1.0.8/  ...
>
> I guess this is what broke it.

Oh, got it.

However, with this version of the patch, I get:

--8<---------------cut here---------------start------------->8---
   ?: 0 [+ #f 11]

ERROR: In procedure +:
ERROR: In procedure +: Wrong type argument in position 1: #f
builder for `/gnu/store/y754cn7f468yc1b0pc13cxk99fmnwwx1-manual-database.drv' 
failed with exit code 1
--8<---------------cut here---------------end--------------->8---

which I think is because (string-contains manpage-path "/share/man/")
returns #f.

Could you look into it?

(BTW, I find it slightly clearer to use ‘string-drop’ etc. instead of
‘substring’.)

Other than that it should be fine.

Thank you!

Ludo’.



reply via email to

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