[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#64471] [PATCH 0/2] File database update services
From: |
Bruno Victal |
Subject: |
[bug#64471] [PATCH 0/2] File database update services |
Date: |
Wed, 26 Jul 2023 14:22:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
Hi Ludo’,
On 2023-07-17 21:22, Ludovic Courtès wrote:
> Bruno Victal <mirai@makinata.eu> skribis:
>
>>
>> I'm afraid #$schedule might be insufficient if this is a _mcron_ time-spec.
>> There's an elaborate dance done by fstrim-service-type to handle the more
>> exotic
>> mcron time expressions, perhaps you can reuse it here?
>
> I’m not sure what fstrim-service-type is trying to achieve with this:
>
> #~(job
> ;; Note: The “if” below is to ensure that
> ;; lists are ungexp'd correctly since @var{schedule}
> ;; can be either a procedure, a string or a list.
> #$(if (list? schedule)
> #~'(#$@schedule)
> schedule)
> …")
>
> If we simply have:
>
> #~(job #$schedule …)
>
> then ‘schedule’ can be anything you might expect, like:
>
> • "0 * * * *" ;string
>
> • #~(next-hour …) ;gexp
>
> • #~(lambda (x) …) ;another gexp
>
> What’s the problem? :-)
There's a third choice for that argument: a staged expression/list, hence
the gexp/ungexp dance.
[1]: <https://www.gnu.org/software/mcron/manual/mcron.html#Guile-Syntax>
[2]:
<https://www.gnu.org/software/mcron/manual/mcron.html#Extended-Guile-examples>
--
Furthermore, I consider that nonfree software must be eradicated.
Cheers,
Bruno.
[bug#64471] [PATCH 2/2] services: Add 'package-database' service., Ludovic Courtès, 2023/07/05