From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 02 17:05:58 2021 Received: (at submit) by debbugs.gnu.org; 2 Oct 2021 21:05:58 +0000 Received: from localhost ([127.0.0.1]:60721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWmCj-00049n-Py for submit@debbugs.gnu.org; Sat, 02 Oct 2021 17:05:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:50860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWmCi-00049V-1P for submit@debbugs.gnu.org; Sat, 02 Oct 2021 17:05:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWmCh-0006zf-ME for guix-patches@gnu.org; Sat, 02 Oct 2021 17:05:55 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:55238 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWmCe-0000XS-NY for guix-patches@gnu.org; Sat, 02 Oct 2021 17:05:54 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1633208748; bh=DFxrS4/6G3q7aKSOBrXHfBZ2BQqLG6QsfAKuxsfC2P0=; h=From:To:Subject:Date; b=r9AAdtnIs1SD7KM5faw1Bb8hF+KLjBZf6AxSOMufBNnnBWRp32Gyn1sxxkW85R2iG M9hHmUNuojtQZNhjvpT2k7bbwTOzLVxB2JfvYIVCv6WSuw1KbVN1ZKfQ8zGWS+ySN0 dTWu8g6waBlXsrSg+haPxaVfKBK5fcxTvih4iKXU= To: guix-patches@gnu.org Subject: [PATCH] =?UTF-8?q?scripts:=20home/system:=20Don=E2=80=99t=20throw?= =?UTF-8?q?=20an=20error=20if=20no=20generations=20exist.?= X-Debbugs-CC: Maxime Devos Message-Id: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> Date: Sat, 02 Oct 2021 23:05:48 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 39 X-Spam_score: 3.9 X-Spam_bar: +++ X-Spam_report: (3.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=0.233, PDS_OTHER_BAD_TLD=1.999, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=2.299 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Previously, When running ‘guix home describe’ or ‘guix system describe’ prior to having any generations, a backtrace would produced. Since not having any existing generations is not an error, [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80=98g= uix system describe=E2=80=99 prior to having any generations, a backtrace would produced. Since not having any existing generations is not an error, a warning would be enough. $ guix system describe guix system: warning: no system generation, nothing to describe * guix/scripts/home.scm (process-command): Produce a warning instead of an error if no generations exist. * guix/scripts/system.scm (process-command): Likewise. Fixes: Reported-by: Maxime Devos --- guix/scripts/home.scm | 2 +- guix/scripts/system.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm index 75df6d707d..70860564eb 100644 --- a/guix/scripts/home.scm +++ b/guix/scripts/home.scm @@ -260,7 +260,7 @@ (define-syntax-rule (with-store* store exp ...) ((describe) (match (generation-number %guix-home) (0 - (error (G_ "no home environment generation, nothing to describe~%"= ))) + (warning (G_ "no home environment generation, nothing to describe~= %"))) (generation (display-home-environment-generation generation)))) ((list-generations) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 65eb98e4b2..d77d3ea289 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1307,7 +1307,7 @@ (define-syntax-rule (with-store* store exp ...) ((describe) (match (generation-number %system-profile) (0 - (error (G_ "no system generation, nothing to describe~%"))) + (warning (G_ "no system generation, nothing to describe~%"))) (generation (display-system-generation generation)))) ((search) base-commit: f1a3c11407b52004e523ec5de20d326c5661681f --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 03 04:53:35 2021 Received: (at 50982) by debbugs.gnu.org; 3 Oct 2021 08:53:35 +0000 Received: from localhost ([127.0.0.1]:60975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWxFX-00088Y-52 for submit@debbugs.gnu.org; Sun, 03 Oct 2021 04:53:35 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:52770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWxFV-00088Q-7g for 50982@debbugs.gnu.org; Sun, 03 Oct 2021 04:53:33 -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 1LtX2600D0mfAB401LtX4S; Sun, 03 Oct 2021 10:53:31 +0200 Message-ID: Subject: Re: [bug#50982] [PATCH] scripts: home/system: =?UTF-8?Q?Don=E2=80=99t?= throw an error if no generations exist. From: Maxime Devos To: Xinglu Chen , 50982@debbugs.gnu.org Date: Sun, 03 Oct 2021 10:53:31 +0200 In-Reply-To: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> References: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-z2FrO/1Ue4Ds0+aBMPFH" 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=1633251211; bh=xI1pEfm/WDIiDTlacG03TDgX0lMx3X/HyOtKE2B9Zf0=; h=Subject:From:To:Date:In-Reply-To:References; b=OwCvfyH5rqPPO+IVMLQaxWFHQrwmc2Fu/HAzyFcIKAXgbCkkQS8UMZphsXgTrnD1J 0dOMJBodPtEQo2ZNTtFJITBy+yw3l0p+Ey4rMVAk0HyqjLlloysUwR0kHWhUfb7kYY iGBfiTCc+UIFanw+4WL38QDclrSPMIUOUH3ofPhHdvdB5LQvCvDj1PZOOVSKqeVg21 CCH65BmvdAtCADF07BapSOD4FAQ5+HbPiuP7pK6cP3USyNhcdnLfTk1jXt+ER3bi2k eKZDYOhKptlx4SHGSf8N9nTu9O62be/8YQ9wKJPvAvnvMHZap1HouItTH2MH7Ej2wZ GovaDRVpe8cqQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50982 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-z2FrO/1Ue4Ds0+aBMPFH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: > Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80= =98guix system describe=E2=80=99 prior > to having any generations, a backtrace would produced. Since not having = any > existing generations is not an error, a warning would be enough. >=20 > $ guix system describe > guix system: warning: no system generation, nothing to describe Printing a warning instead of an error to avoid a backrace isn't necessary. E.g., "guix show i-do-not-exists" prints an error =E2=80=98guix show: error: i-do-not-exist: package not found=E2=80=99. I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla")) for these kind of errors, it appears to work '%find-package' in (gnu packag= es). I don't know if the output of "guix system describe" and "guix home describ= e" should be an error or warning here ... Greetings, Maxime. --=-z2FrO/1Ue4Ds0+aBMPFH 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+4iGRcl7gUCYVlvixccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iL+AQD+DVHtvsy0TySCdnPSg09nWTyo OZbErU1Ts9wXO08JrAEA1x1AiNGcy8Tfonp9SAWKS1uXIUd/Fr+SY65oAyUEigc= =WkOa -----END PGP SIGNATURE----- --=-z2FrO/1Ue4Ds0+aBMPFH-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 19 09:59:22 2021 Received: (at 50982) by debbugs.gnu.org; 19 Oct 2021 13:59:22 +0000 Received: from localhost ([127.0.0.1]:51617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcpeE-0008DM-3S for submit@debbugs.gnu.org; Tue, 19 Oct 2021 09:59:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcpeC-0008D9-Av for 50982@debbugs.gnu.org; Tue, 19 Oct 2021 09:59:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54536) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcpe3-0006xx-Rd; Tue, 19 Oct 2021 09:59:13 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52963 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpe3-0008LT-IW; Tue, 19 Oct 2021 09:59:11 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#50982: [PATCH] scripts: home/system: =?utf-8?Q?Don?= =?utf-8?Q?=E2=80=99t?= throw an error if no generations exist. References: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> Date: Tue, 19 Oct 2021 15:59:08 +0200 In-Reply-To: (Maxime Devos's message of "Sun, 03 Oct 2021 10:53:31 +0200") Message-ID: <87o87l86ab.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50982 Cc: 50982@debbugs.gnu.org, Xinglu Chen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Xinglu, Did you have a chance to look into this? TIA! Ludo=E2=80=99. Maxime Devos skribis: > Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >> Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80= =98guix system describe=E2=80=99 prior >> to having any generations, a backtrace would produced. Since not having= any >> existing generations is not an error, a warning would be enough. >>=20 >> $ guix system describe >> guix system: warning: no system generation, nothing to describe > > Printing a warning instead of an error to avoid a backrace isn't necessar= y. > E.g., "guix show i-do-not-exists" prints an error > =E2=80=98guix show: error: i-do-not-exist: package not found=E2=80=99. > > I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla")) > for these kind of errors, it appears to work '%find-package' in (gnu pack= ages). > > I don't know if the output of "guix system describe" and "guix home descr= ibe" > should be an error or warning here ... > > Greetings, > Maxime. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 30 07:18:47 2021 Received: (at 50982) by debbugs.gnu.org; 30 Oct 2021 11:18:47 +0000 Received: from localhost ([127.0.0.1]:56783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgmNr-0003ge-6O for submit@debbugs.gnu.org; Sat, 30 Oct 2021 07:18:47 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:36980 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgmNp-0003gR-RT for 50982@debbugs.gnu.org; Sat, 30 Oct 2021 07:18:46 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635592720; bh=yK1SEsv7tDnrYRCMRd43lGhqAxaep8AK/Hv9KH1xFc0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=bcrtyXhtdqKixVw8Xaim2KJFx020Edj05HgBhzoyp9zJWLFOZ8RdZGe5dgD4tF96w MpOKE+PYxMATkaQnAsGtTCYBeR3+wLcZ5y4U7HMUvGVeLfRkdeGpzvwDhCrGDo68bM chGpDe2lP8h6Sdlju7sdLeeanuPPaEAvsoH0blMM= To: Maxime Devos , 50982@debbugs.gnu.org Subject: Re: [bug#50982] [PATCH] scripts: home/system: =?utf-8?Q?Don?= =?utf-8?Q?=E2=80=99t?= throw an error if no generations exist. In-Reply-To: References: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> Date: Sat, 30 Oct 2021 13:18:39 +0200 Message-ID: <87ee827oc0.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Sun, Oct 03 2021, Maxime Devos wrote: > Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >> Previously, When running ‘guix home describe’ or ‘guix system describe’ prior >> to having any generations, a backtrace would produc [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 50982 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Sun, Oct 03 2021, Maxime Devos wrote: > Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >> Previously, When running ‘guix home describe’ or ‘guix system describe’ prior >> to having any generations, a backtrace would produc [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Sun, Oct 03 2021, Maxime Devos wrote: > Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >> Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80= =98guix system describe=E2=80=99 prior >> to having any generations, a backtrace would produced. Since not having= any >> existing generations is not an error, a warning would be enough. >>=20 >> $ guix system describe >> guix system: warning: no system generation, nothing to describe > > Printing a warning instead of an error to avoid a backrace isn't necessar= y. > E.g., "guix show i-do-not-exists" prints an error > =E2=80=98guix show: error: i-do-not-exist: package not found=E2=80=99. > > I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla")) > for these kind of errors, it appears to work '%find-package' in (gnu pack= ages). > > I don't know if the output of "guix system describe" and "guix home descr= ibe" > should be an error or warning here ... Hmm, since I don=E2=80=99t think that not having any generations is an erro= r, I would say it makes more sense to use =E2=80=98warning=E2=80=99 instead of = =E2=80=98leave=E2=80=99. =E2=80=98leave=E2=80=99 would signal that something isn=E2=80=99t correct, = which makes sense if one runs =E2=80=98guix show doesnt-exist=E2=80=99, but not having any gener= ations doesn=E2=80=99t really mean that something is wrong. WDYT? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmF9Kg8VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5W6cP/219MvUYkwuoH4+/7yCUZqYeoHQx at9EDmf6Qynah5/kz0xPlhN81Dpmd0RzHCXp9o6wqIaReEaBvLTLc8OdN9iz3V2y D3BBOIEmCoe6XfSP0cwHQ1Of5hlrbIp1pOc+jLk8gqrXJRswaB07UfRiqD45u+eV 1P+JxkAnFCC2mXvV0YWu1xPGp2XOe8DzJgj7+FGJQCTPbn2/nBvJIBWCphSNNV5N XaGTNW5CfT4IwbFbt34pa62xkuW9uLz9Rws78tDBHQ2CfmOjAfowvCGlx0eO1XZ/ BKTxUJYthTYfkRxUeY7UH7Oc+RWcBRt1+EV/9JPZY1UmBiYiMMhnBwE53SdhOGhg ElOpwXxWmphRg+m3vsnourDL2Qpxg60EjhjiRL73nzQtZkPlr0YPSZQ997WRAAAn NOLEOCDyC2qfAsl90ORVNtoq9Z8JxnyzYvVsWbaE8D0ZeJReK1IcHsL2h/z18TD7 y5F2wcH2t5uiBeJY2mszlqlirjgfgpvR9PgWC96bNqQbwcrtLyIYKW7OwekByK4A /TPyK73pr8NGMoU1Z1h+CKAjB2xgq8PUuwGSjR7ME23plv5n5QTkoIOHVTDCjveU O0tw6DkIemyrx7htBuLyiMRmwAbOgKLMzGp3fk4Nj36VHLmmwr7PmHt99pvL2iuL 8a18YcF1l/mXGWg2 =qMIu -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 30 10:24:56 2021 Received: (at 50982) by debbugs.gnu.org; 30 Oct 2021 14:24:57 +0000 Received: from localhost ([127.0.0.1]:58110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgpI0-0003BR-Mt for submit@debbugs.gnu.org; Sat, 30 Oct 2021 10:24:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgpHy-0003BA-7k for 50982@debbugs.gnu.org; Sat, 30 Oct 2021 10:24:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgpHs-0007U3-0s; Sat, 30 Oct 2021 10:24:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ktCANwHTqn+hm/TnPQCF0xAxMu2B7PPMXUCdTt5vdLw=; b=FRuZZsp/JhT6T/TIJpE8 glTWek/n34caqqcYVnvN0fWLJcEIDuPaEtlkz/HXIYYKdLf9Z/2Mmt4L8mWwSjUG3URpFkPvCaywr Z1M25oNx8NXugXOvob049jeS4v2agOjkfrA1tKrHC/K0ZKm4WqjFuYEP1SEC3MbwjwR+UKtduxMbp UfhvvDqfgoOU9P2b23XUQ9c1uypOWrfrDpf9DOwQf8bELDRSKG3la/z31MtwE+H3MxEJSEqibOnQZ hOqZm1mzgT5yU4L032YIWfecJa3Nt22jUGom/KMNJxZUAOcWMod5L2g7/9ZPmBDIzJ2BtodYWcA+J dOSdrE9lY9EFKw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55486 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgpHr-0000Gr-LA; Sat, 30 Oct 2021 10:24:47 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: [bug#50982] [PATCH] scripts: home/system: =?utf-8?Q?Don?= =?utf-8?Q?=E2=80=99t?= throw an error if no generations exist. References: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> <87ee827oc0.fsf@disroot.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Brumaire an 230 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: Sat, 30 Oct 2021 16:24:45 +0200 In-Reply-To: <87ee827oc0.fsf@disroot.org> (Xinglu Chen's message of "Sat, 30 Oct 2021 13:18:39 +0200") Message-ID: <87h7cytwsy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 50982 Cc: 50982@debbugs.gnu.org, Maxime Devos X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hi, Xinglu Chen skribis: > On Sun, Oct 03 2021, Maxime Devos wrote: > >> Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >>> Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80= =98guix system describe=E2=80=99 prior >>> to having any generations, a backtrace would produced. Since not havin= g any >>> existing generations is not an error, a warning would be enough. >>>=20 >>> $ guix system describe >>> guix system: warning: no system generation, nothing to describe >> >> Printing a warning instead of an error to avoid a backrace isn't necessa= ry. >> E.g., "guix show i-do-not-exists" prints an error >> =E2=80=98guix show: error: i-do-not-exist: package not found=E2=80=99. >> >> I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla")) >> for these kind of errors, it appears to work '%find-package' in (gnu pac= kages). >> >> I don't know if the output of "guix system describe" and "guix home desc= ribe" >> should be an error or warning here ... > > Hmm, since I don=E2=80=99t think that not having any generations is an er= ror, I > would say it makes more sense to use =E2=80=98warning=E2=80=99 instead of= =E2=80=98leave=E2=80=99. > =E2=80=98leave=E2=80=99 would signal that something isn=E2=80=99t correct= , which makes sense if > one runs =E2=80=98guix show doesnt-exist=E2=80=99, but not having any gen= erations > doesn=E2=80=99t really mean that something is wrong. Yeah, I guess =E2=80=98warning=E2=80=99 is fine. Maxime=E2=80=99s point is that we should always use procedures from (guix diagnostics) for error/warning/info reports. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 06 05:28:34 2022 Received: (at 50982-done) by debbugs.gnu.org; 6 Jan 2022 10:28:34 +0000 Received: from localhost ([127.0.0.1]:39726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Q0Y-0002SM-BO for submit@debbugs.gnu.org; Thu, 06 Jan 2022 05:28:34 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:59016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Q0V-0002S6-3U for 50982-done@debbugs.gnu.org; Thu, 06 Jan 2022 05:28:33 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 88F74289; Thu, 6 Jan 2022 11:28:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gbG-jy3pyBDh; Thu, 6 Jan 2022 11:28:23 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 4741AFF; Thu, 6 Jan 2022 11:28:23 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#50982: [PATCH] scripts: home/system: =?utf-8?Q?Don?= =?utf-8?Q?=E2=80=99t?= throw an error if no generations exist. References: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz> Date: Thu, 06 Jan 2022 11:28:22 +0100 In-Reply-To: (Maxime Devos's message of "Sun, 03 Oct 2021 10:53:31 +0200") Message-ID: <877dbdf9a1.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 88F74289 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 50982-done Cc: 50982-done@debbugs.gnu.org, Xinglu Chen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Maxime Devos skribis: > Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]: >> Previously, When running =E2=80=98guix home describe=E2=80=99 or =E2=80= =98guix system describe=E2=80=99 prior >> to having any generations, a backtrace would produced. Since not having= any >> existing generations is not an error, a warning would be enough. >>=20 >> $ guix system describe >> guix system: warning: no system generation, nothing to describe > > Printing a warning instead of an error to avoid a backrace isn't necessar= y. > E.g., "guix show i-do-not-exists" prints an error > =E2=80=98guix show: error: i-do-not-exist: package not found=E2=80=99. > > I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla")) > for these kind of errors, it appears to work '%find-package' in (gnu pack= ages). I=E2=80=99ve done that now, thanks! Ludo=E2=80=99. From unknown Fri Aug 15 16:23:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 03 Feb 2022 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator