From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0EgtD60+NWBXFwAA0tVLHw (envelope-from ) for ; Tue, 23 Feb 2021 17:43:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SCsdC60+NWCaWwAA1q6Kng (envelope-from ) for ; Tue, 23 Feb 2021 17:43:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7DEC15A5C for ; Tue, 23 Feb 2021 18:43:08 +0100 (CET) Received: from localhost ([::1]:33318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEbiG-0004SM-21 for larch@yhetil.org; Tue, 23 Feb 2021 12:43:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEbiA-0004S2-51 for guix-patches@gnu.org; Tue, 23 Feb 2021 12:43:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEbi9-0005nT-TX for guix-patches@gnu.org; Tue, 23 Feb 2021 12:43:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lEbi9-0001dT-Rq for guix-patches@gnu.org; Tue, 23 Feb 2021 12:43:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46031] services: cuirass: Add "simple-cuirass-services". Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Feb 2021 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46031 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Mathieu Othacehe Cc: 46031@debbugs.gnu.org, Jonathan Brielmaier Received: via spool by 46031-submit@debbugs.gnu.org id=B46031.16141021686266 (code B ref 46031); Tue, 23 Feb 2021 17:43:01 +0000 Received: (at 46031) by debbugs.gnu.org; 23 Feb 2021 17:42:48 +0000 Received: from localhost ([127.0.0.1]:60434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEbhw-0001d0-IT for submit@debbugs.gnu.org; Tue, 23 Feb 2021 12:42:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEbhv-0001cn-P0 for 46031@debbugs.gnu.org; Tue, 23 Feb 2021 12:42:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48727) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEbhq-0005fX-Hu; Tue, 23 Feb 2021 12:42:42 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59752 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lEbhp-0007fz-LG; Tue, 23 Feb 2021 12:42:41 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87czxxz767.fsf@gnu.org> <874ki7j97p.fsf@gnu.org> <87k0r0iizg.fsf@gnu.org> <87eeh8b6mq.fsf@gnu.org> <87blcbkw52.fsf@gnu.org> <87v9aj5dyl.fsf@gnu.org> <875z2ilxnl.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 =?UTF-8?Q?Vent=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 23 Feb 2021 18:42:39 +0100 In-Reply-To: <875z2ilxnl.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 23 Feb 2021 14:30:06 +0100") Message-ID: <875z2i4r5c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.87 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E7DEC15A5C X-Spam-Score: -2.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: X62sVZm+8HMA Hi, Mathieu Othacehe skribis: >> I guess the first step would be to provide an a =E2=80=98package-channel= (s)=E2=80=99 >> procedure that does like =E2=80=98package-provenance=E2=80=99, but retur= ns 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, =E2=80=9Cgnu-system.scm=E2=80=9D is about the 'guix chan= nel. Intuitively I=E2=80=99d expect channel handling to happen in user code: eit= her 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 > 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=3D> (package-location package) location-file) > + (#f #f) The #f return value doesn=E2=80=99t 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=3D? "guix" (manifest-entry-name entry)= )) > + (manifest-entry-channel entry)))) > + (current-profile-entries))))))) To avoid duplication, perhaps you should rewrite =E2=80=98package-provenanc= e=E2=80=99 in terms of =E2=80=98package-channels=E2=80=99? Otherwise LGTM, thanks! Thanks, Ludo=E2=80=99.