From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 46031@debbugs.gnu.org, Jonathan Brielmaier <jonathan.brielmaier@web.de>
Subject: [bug#46031] services: cuirass: Add "simple-cuirass-services".
Date: Tue, 23 Feb 2021 18:42:39 +0100 [thread overview]
Message-ID: <875z2i4r5c.fsf@gnu.org> (raw)
In-Reply-To: <875z2ilxnl.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 23 Feb 2021 14:30:06 +0100")
Hi,
Mathieu Othacehe <othacehe@gnu.org> skribis:
>> I guess the first step would be to provide an a ‘package-channel(s)’
>> procedure that does like ‘package-provenance’, but returns a list of
>> channels.
>
> Seems fine to me. Here's an implementation attached. If it works for
> you, the next step will be to make the "cuirass-jobs" procedure of
> "gnu-system.scm" operate on channels I guess.
But by definition, “gnu-system.scm” is about the 'guix channel.
Intuitively I’d expect channel handling to happen in user code: either
in the user-provided manifest, or in some helper code in Cuirass. WDYT?
> From d44dcd5d153ba0a4627c205f24a0741384f3d301 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <othacehe@gnu.org>
> Date: Tue, 23 Feb 2021 14:24:39 +0100
> Subject: [PATCH] describe: Add package-channels.
>
> * guix/describe.scm (package-channels): New procedure.
[...]
> +(define (package-channels package)
> + "Return the list of channels providing PACKAGE or an empty list if it could
> +not be determined."
> + (match (and=> (package-location package) location-file)
> + (#f #f)
The #f return value doesn’t match the docstring.
> + (file
> + (let ((file (if (string-prefix? "/" file)
> + file
> + (search-path %load-path file))))
> + (and file
> + (string-prefix? (%store-prefix) file)
> +
> + (filter-map
> + (lambda (entry)
> + (let ((item (manifest-entry-item entry)))
> + (and (or (string-prefix? item file)
> + (string=? "guix" (manifest-entry-name entry)))
> + (manifest-entry-channel entry))))
> + (current-profile-entries)))))))
To avoid duplication, perhaps you should rewrite ‘package-provenance’ in
terms of ‘package-channels’?
Otherwise LGTM, thanks!
Thanks,
Ludo’.
prev parent reply other threads:[~2021-02-23 17:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 8:50 [bug#46031] services: cuirass: Add "simple-cuirass-services" Mathieu Othacehe
2021-01-22 16:37 ` Jonathan Brielmaier
2021-01-22 17:55 ` Mathieu Othacehe
2021-01-24 13:47 ` Jonathan Brielmaier
2021-01-29 11:39 ` Mathieu Othacehe
2021-02-02 22:43 ` Jonathan Brielmaier
2021-02-19 19:16 ` bug#46031: " Mathieu Othacehe
2021-02-19 21:35 ` [bug#46031] " Jonathan Brielmaier
2021-02-22 8:53 ` Mathieu Othacehe
2021-02-20 10:59 ` Ludovic Courtès
2021-02-22 8:50 ` Mathieu Othacehe
2021-02-22 12:59 ` Ludovic Courtès
2021-02-23 8:48 ` Mathieu Othacehe
2021-02-23 9:29 ` Ludovic Courtès
2021-02-23 13:30 ` Mathieu Othacehe
2021-02-23 17:42 ` Ludovic Courtès [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875z2i4r5c.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=46031@debbugs.gnu.org \
--cc=jonathan.brielmaier@web.de \
--cc=othacehe@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.