From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRh8d-00010v-11 for guix-patches@gnu.org; Tue, 27 Nov 2018 12:27:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRh8Z-00032N-Og for guix-patches@gnu.org; Tue, 27 Nov 2018 12:27:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:48230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRh8Z-00032F-LI for guix-patches@gnu.org; Tue, 27 Nov 2018 12:27:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRh8Y-0000ka-4g for guix-patches@gnu.org; Tue, 27 Nov 2018 12:27:03 -0500 Subject: [bug#33286] Add 'list-formats' to 'guix pack' Resent-Message-ID: Date: Tue, 27 Nov 2018 19:26:38 +0200 From: Efraim Flashner Message-ID: <20181127172638.GB17277@macbook41> References: <20181106095316.GB1206@macbook41> <87lg66xlw0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4bRzO86E/ozDv8r1" Content-Disposition: inline In-Reply-To: <87lg66xlw0.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33286@debbugs.gnu.org --4bRzO86E/ozDv8r1 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 06, 2018 at 04:31:59PM +0100, Ludovic Court=C3=A8s wrote: > Hello, >=20 > Efraim Flashner skribis: >=20 > > From af9a132a662f1d703df1c32278a45d2adca146ed Mon Sep 17 00:00:00 2001 > > From: Efraim Flashner > > Date: Tue, 6 Nov 2018 11:50:48 +0200 > > Subject: [PATCH] pack: List the available formats. > > > > * guix/scripts/pack.scm (show-formats): New variable. > > (%options, show-help): Add 'list-formats' option. >=20 > [...] >=20 > > @@ -551,6 +552,18 @@ please email '~a'~%") > > (squashfs . ,squashfs-image) > > (docker . ,docker-image))) > > =20 > > +(define (show-formats) > > + ;; Print the supported pack formats. > > + (display (G_ "The supported formats for 'guix pack' are:")) > > + (newline) > > + (display (G_ " > > + tarball A self-contained tarball, ready to run on another mach= ine.")) > > + (display (G_ " > > + squashfs A squashfs image, ready for 'cluster engines' and the = like.")) >=20 > I=E2=80=99d write =E2=80=9CSquashfs image suitable for Singularity=E2=80= =9D and remove =E2=80=9CA=E2=80=9D from > each. >=20 > Also, since we have the =E2=80=98%formats=E2=80=99 alist right above, wha= t about > adjusting it so that it contains each format description, and then > =E2=80=98show-formats=E2=80=99 would just traverse it? >=20 > You could do: >=20 > (define-record-type > (image-format proc description) > image-format? > (proc image-format-procedure) > (description image-format-description)) >=20 > (define %formats > (let-syntax ((description (syntax-rules () ((_ str) str)))) > `((tarball . ,(image-format self-contained-tarball > (description "foo bar"))) > =E2=80=A6))) >=20 > The dummy =E2=80=98description=E2=80=99 macro is here to allow =E2=80=98x= gettext=E2=80=99 to catch the > translatable strings without actually translating them right away; > =E2=80=98show-formats=E2=80=99 will have to call =E2=80=98G_=E2=80=99 for= that. >=20 > WDYT? >=20 > Ludo=E2=80=99. I do like the idea, but I haven't been able to get it to work. In the mean time I've committed this as db08ea40873ae20507bc40d34a56dea1b8ce8f0e so we at least get the benefits of having it here. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlv9fk4ACgkQQarn3Mo9 g1GsqBAAvysITfIlz1HnhtmwjdzPLJLm3qmArvkSvdqQhWPhQ9zDhh5rsBdaPz5I /DHtjlklX8AzajlD1DV/2nhr51euxY1Gq5fXMKgtecb+mp3T5KhWfU0MFRZqbuHl zodZWajTRxdb378Znq6Z6l+54WkFqolspPDnh6w8/EPmQJ4QAQ+wkonivPLyIZBg YkEwD91np5I+osy026czqSa4h4Qy8JrRjvzqJbUMe86Aj92ll/YvtT7QNz3QGShM WSvQMQEmmtZUXi8/2U0CLF/iggBiSO65PSmlhRngqPRLqB9t80pWrztLhfvfr01k URekyFPKjh/TM+yKjZk3DriLtlW9UicJPM5Heg8zcwuRyFf0JC6DnYJjVj0MfipP bB6v2ZOSk/WiURC9mibRDfRVD6Hup/bLfjxZFCO6zwEoqQqzoIFL10djPa4oJ7zC KTCD0gAev6mu/TBn5++AtR00xGb6p+rt1qDlgGAKkm3yJR97nS/zupfv4bmKInD+ hFnLk+iuqvgBbGJ8KN8Xqm/asEOOCoOxZ7ImXxnH/W343zq4vH6vcy2FvoU726sY h4CaZF5oeg+slcGXZcQUZJKLiQwEn+EDQOyiKT+o4S8lg+9qrwgO9QbHiyILeYzh IBgwUVK8pe9SIbNCF1YzGrdTi9LdP4H16yFdMCefX0lIsZoWpJY= =mzO8 -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1--