From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yOo4N4TW0GCaGQAAgWs5BA (envelope-from ) for ; Mon, 21 Jun 2021 20:12:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OK32MoTW0GA1OQAA1q6Kng (envelope-from ) for ; Mon, 21 Jun 2021 18:12:20 +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 65819C1A0 for ; Mon, 21 Jun 2021 20:12:20 +0200 (CEST) Received: from localhost ([::1]:52884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvOPD-0001PF-98 for larch@yhetil.org; Mon, 21 Jun 2021 14:12:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvOOw-0001MF-UL for guix-patches@gnu.org; Mon, 21 Jun 2021 14:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvOOw-000450-MF for guix-patches@gnu.org; Mon, 21 Jun 2021 14:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvOOw-0005rx-GZ for guix-patches@gnu.org; Mon, 21 Jun 2021 14:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Jun 2021 18:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49149 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , 49149@debbugs.gnu.org Received: via spool by 49149-submit@debbugs.gnu.org id=B49149.162429911922551 (code B ref 49149); Mon, 21 Jun 2021 18:12:02 +0000 Received: (at 49149) by debbugs.gnu.org; 21 Jun 2021 18:11:59 +0000 Received: from localhost ([127.0.0.1]:36899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvOOs-0005rf-Ql for submit@debbugs.gnu.org; Mon, 21 Jun 2021 14:11:59 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:34910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvOOq-0005rU-Mw for 49149@debbugs.gnu.org; Mon, 21 Jun 2021 14:11:57 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id KuBu2500Z0mfAB401uBuWa; Mon, 21 Jun 2021 20:11:55 +0200 Message-ID: <66838991d056aed2ab4c198e27df0a7fa4357a74.camel@telenet.be> From: Maxime Devos Date: Mon, 21 Jun 2021 20:11:54 +0200 In-Reply-To: <20210621061205.31878-5-maxim.cournoyer@gmail.com> References: <20210621061205.31878-1-maxim.cournoyer@gmail.com> <20210621061205.31878-5-maxim.cournoyer@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-8RA0mC5LcZqxa4LyAvLR" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624299115; bh=F11PnPNKY3iLTPO4CTKaD2rqxgs7Tp7LV9eyRXGLbE8=; h=Subject:From:To:Date:In-Reply-To:References; b=Lgz0bdWP+oTalqK2yz/xv2K9oGE51d5R4PBL7m6Acl2rkRgkZck/lbQ7lt6Peqp16 DjNCHMRGIYQXr0QOlrt9X7YLbYDyCnxQUSh8/iywuIEDz6D1GRVr6cjIPjl4lc2RHp 0Hijv5cXNJdNJHlnKyVwUVHoafZohaNjJPlybf5TpjHeYNweIaQzSoHMmqi/hP78XU gGxwA/Q4sBuQoa7VLI4PzLL+kczo2WovJZTTwAZJqehPvAazBn2vUJn2nDf61bXAFZ gdR1XxIWILRRbH5w2V1x8dJxcWRrN3DGTIdyKYjn44LkknwUolN/cSPQeH+t5m2vvO ndwT04dDMrrxg== 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624299140; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=F11PnPNKY3iLTPO4CTKaD2rqxgs7Tp7LV9eyRXGLbE8=; b=fGS2YhVdho+6cFyS/vuSuNITjUGYWtBufOliegXabgVh/iPD5VooRCIlkXa7fFtxblQ/gK Rcf1ssAX4b8nQYKVWsCnb1eghUKBNx4Pm+uR+b/yiY4YnjICEois7N7lznymnGiU55KBua W1WyFRT9B9ppq0lrXb89vHTmdFtvzU7xWpvAHNZ1mYhTBt67boHLaVdGhXSPgB9Svj55TY /mW5nQFNzxQIkkO1/VdPWsLj8XW+bIRRYA1k61Bz5jXFjbDTmnLpF1lchByXmSrpYuuyUC k8CDCgF0Q+aYv0NEjtWxLBlwYfjJuw+ByMQB7oM8Ta+CxezxhMtSPCJHE+nSJg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624299140; a=rsa-sha256; cv=none; b=sN6KgrYRi1ZVnUHi2kZI0lCOD4uAYa6gIi389yV9xxAtEpFpYKOXqJjW0YCU3+MjtymLXd T/g0PXUcBN7Dwk6c1yck4RztNwr5BLcI/esb9+9NYhHpAFlSqa3amE3TlnOgjnXtO8vG0V at428vOAMUZVMaKQVQ12n+C8PXEP59GWlXEEfhe9Nw6BOPa7XMjH9DlWqsUQkpE6alrQGs n74uBSt8ZObXMW5HXcxTpHawq3JB9/raoxBkROYxw8al3uLB0AJbenWBE8aRKk9ca2+oc4 aPdIsrqJWk4Aw2b0AZ+DS66Tlo1C2/Np4KrkNaJUjLhgfcvJeeh3+APtNJ+8ug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Lgz0bdWP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Lgz0bdWP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: 65819C1A0 X-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: yvtjpOmA8N8e --=-8RA0mC5LcZqxa4LyAvLR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxim Cournoyer schreef op ma 21-06-2021 om 02:12 [-0400]: > Instead of just naming them by their pack type, add information from the > package(s) they contain to make it easier to differentiate them. >=20 > * guix/scripts/pack.scm (manifest->friendly-name): Extract procedure from= ... > (docker-image): ... here. Adjust REPOSITORY argument value accordingly. > (guix-pack): Derive NAME using MANIFEST->FRIENDLY-NAME. > --- > guix/scripts/pack.scm | 44 +++++++++++++++++++++++++------------------ > 1 file changed, 26 insertions(+), 18 deletions(-) >=20 > diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm > index 7ea97a4b7a..9d4bb9f497 100644 > --- a/guix/scripts/pack.scm > +++ b/guix/scripts/pack.scm > @@ -172,6 +172,23 @@ dependencies are registered." > (computed-file "store-database" build > #:options `(#:references-graphs ,(zip labels items)))) > =20 > +;;; XXX: The following procedure has to *also* be used in the build side > +;;; G-Exp, because PROFILE is passed as a derivation in the tests. > +(define define-manifest->friendly-name > + '(define (manifest->friendly-name manifest) [...])) > > +(eval define-manifest->friendly-name (current-module)) You can avoid 'eval' here by defining 'manifest->friendly-name in a separate guix/build/pack-utils.scm module. Alternatively, some macroology (untested, may need some tweaks): (define-syntax define-gexp-and-expand ((_ variable code code* ...) (begin (define variable #~(code code* ...)) code code* ...))) (define-gexp-and-expand define-manifest->friendly-name (define (manifest->friendly-name manifest) [... docstring] [... all the code])) Greetings, Maxime. --=-8RA0mC5LcZqxa4LyAvLR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYNDWahccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sKxAQDOdX1PX0MmtaFSPl8V6yx9Sv5L kGup4xyOdCTbBlwpowEAm5Lca5nSDDBNkZOxPp0rTHfYlq/fWDzyA2aEJ3iyIAs= =0UGz -----END PGP SIGNATURE----- --=-8RA0mC5LcZqxa4LyAvLR--