unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 64471@debbugs.gnu.org
Subject: [bug#64471] [PATCH 0/2] File database update services
Date: Wed, 26 Jul 2023 14:22:27 +0100	[thread overview]
Message-ID: <a11a5a7f-5886-3a35-ea47-e7bba9d92a2e@makinata.eu> (raw)
In-Reply-To: <87o7kanv9l.fsf_-_@gnu.org>

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.




  parent reply	other threads:[~2023-07-26 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05  9:59 [bug#64471] [PATCH 0/2] File database update services Ludovic Courtès
2023-07-05 10:16 ` [bug#64471] [PATCH 1/2] services: Add 'file-database' service Ludovic Courtès
2023-07-13 18:00   ` Bruno Victal
2023-07-17 20:22     ` [bug#64471] [PATCH 0/2] File database update services Ludovic Courtès
2023-07-20 21:22       ` [bug#64471] [PATCH v2 1/2] services: Add 'file-database' service Ludovic Courtès
2023-07-26 13:28         ` Bruno Victal
2023-07-20 21:22       ` [bug#64471] [PATCH v2 2/2] services: Add 'package-database' service Ludovic Courtès
2023-07-26 13:22       ` Bruno Victal [this message]
2023-07-05 10:16 ` [bug#64471] [PATCH " Ludovic Courtès
2023-08-07 14:39 ` bug#64471: [PATCH 0/2] File database update services Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a11a5a7f-5886-3a35-ea47-e7bba9d92a2e@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=64471@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).