From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cFyMBnbPbmE/ewEAgWs5BA (envelope-from ) for ; Tue, 19 Oct 2021 16:00:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cBlHAnbPbmEIZQAA1q6Kng (envelope-from ) for ; Tue, 19 Oct 2021 14:00:22 +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 37A1E2390F for ; Tue, 19 Oct 2021 16:00:21 +0200 (CEST) Received: from localhost ([::1]:57054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcpfA-0008Kz-Bc for larch@yhetil.org; Tue, 19 Oct 2021 10:00:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpes-00089b-VJ for guix-patches@gnu.org; Tue, 19 Oct 2021 10:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcpes-0007pz-HL for guix-patches@gnu.org; Tue, 19 Oct 2021 10:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcpes-0008Eg-6l for guix-patches@gnu.org; Tue, 19 Oct 2021 10:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50982] [PATCH] scripts: home/system: =?UTF-8?Q?Don=E2=80=99t?= throw an error if no generations exist. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Oct 2021 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 50982@debbugs.gnu.org, Xinglu Chen Received: via spool by 50982-submit@debbugs.gnu.org id=B50982.163465196231584 (code B ref 50982); Tue, 19 Oct 2021 14:00:02 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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-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=1634652021; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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; bh=K5THOLCXd9jHt5ef8V0uIJ98qP7eBVaKU50cN8/uoEk=; b=PaeZsK9kFhk9wOVbBOTJSC7PWLO7nxhCmYbb+JJUetAiSEsOvjtC/+HhVPWzXvz2Tdykdc 6KVd6wMp7arn54Ig4wjfRIqua9tDLMlqwzuf8eoPEnv31aDYSO2lULPM5d6MvslIyqogOA Hm7VwmgyVrGSnC4HAjwwLP0+uOjjRA3cWGBNvkA16uHe2nrq5r3tIkix7keytt2BRqeN6F EEgbRQGLjQjzSJnmyFbDtVstDKLR72diwhHdTSxf266KgRFhp4Hm3uDsZLVoBseoGqUcd6 BmYs4JZl6lJOK8u7AEyjYKD/3PpwD7fmB2RA3l29o8iUkXJaipRGnL8NDib06Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634652021; a=rsa-sha256; cv=none; b=b9KZCN0xyRFs/I8ivcWsJhdp9b5giIYF6ZjGA3pUz1ZbrvWb2BbDcoiJiSc8nGd5v5UzHe UtoGlFkrTKY4hu0nMbg0VrG2EpLMlR08x7xSOoFhEhOQ+6Zh3WREeQZakIkbJePPZVjlAv 8s5cu5/doXW4Xdny8hMhTU4kdw3sQDEZvZGt9eNqBELe1GTy5mIrl2S+3WuCBzd640/QwK rknZKESTfQq08Hi8zxczW3tsmRE6l17Bte+5k8hnw5wA6xlZvOsP60Ui4fwccpPUy85zA0 d0nm+8pdYrj/kJOj6K8E8kJimBsDzC1tOjgHI+PvJzHDr+ZAyEp0rsdh9BkN2Q== ARC-Authentication-Results: i=1; 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-Spam-Score: -2.93 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: 37A1E2390F X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: YI0bNFJ/nCr0 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.