From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kBi7HtzE1mERKAAAgWs5BA (envelope-from ) for ; Thu, 06 Jan 2022 11:30:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uEBkG9zE1mFkmAAAauVa8A (envelope-from ) for ; Thu, 06 Jan 2022 11:30:52 +0100 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 159711C9A7 for ; Thu, 6 Jan 2022 11:30:52 +0100 (CET) Received: from localhost ([::1]:58132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5Q2k-0003Pp-TS for larch@yhetil.org; Thu, 06 Jan 2022 05:30:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Q11-0000ZD-0v for guix-patches@gnu.org; Thu, 06 Jan 2022 05:29:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5Q10-0001bI-MZ for guix-patches@gnu.org; Thu, 06 Jan 2022 05:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5Q10-0002TC-LR for guix-patches@gnu.org; Thu, 06 Jan 2022 05:29:02 -0500 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-To: guix-patches@gnu.org Resent-Date: Thu, 06 Jan 2022 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 50982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 50982-done@debbugs.gnu.org, Xinglu Chen Mail-Followup-To: 50982@debbugs.gnu.org, ludo@gnu.org, public@yoctocell.xyz Received: via spool by 50982-done@debbugs.gnu.org id=D50982.16414649149450 (code D ref 50982); Thu, 06 Jan 2022 10:29:02 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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: / 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-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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641465052; 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-to: 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=udf+XRXCERiaDR18AxR20lB1zH0qLvcpfl4G2riYr+c=; b=BEPUwOoY1vKlNlPWi757NcKNU8Xfg6s4Qto1T75UirlLihiOq3Sg3l/gGE5bYBLwOH6XCL f+CBknpfxffW/tpdQpZlg7nlPTOweuQ4lfI/cqtDikP1msl6t80QTXsdO6JDA+MGXOB6fu u91i3Jh4FlGEYd9fWMbUCyFXIUpHxEcX3nqPXQv7w7qw4l27rjehbLZVuMR77QVQVB/rlA FER3tYlB7ej/cn8kC3DVQ6PwJYCJfI3FPDL/fZsnAxLrEMEOcEwXzWDYGqYtdG1oup35Te UdOc/i+qHHgKJYbJrxy2cjjp689qMuHTGHqABtGEcAStGgbxm4TRx17LW0OZyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641465052; a=rsa-sha256; cv=none; b=Gwv4AF0nr8wW8GaDhKy2W/AwuOx5mYPQUS5g4w/j6gk0oUNf8OKEnL4ht5R0nBpgwDdPje leAokSEDz8Zn3uyEpk1sFU64qbuaZ/eIRhUisP3GpjN49WGkHUWHyobfa1G+Rwzz+uY/S4 vQsWg3JQeisDK2NkE77MT1p8u8eO6vrGvrmcsyFwSvzF0WmUhRB7FXlwSZ/fLXZVq5z5DM x3EenJbHWQ/sRy11UrO9VEHkP2rj2YA8+0a0/+dWTabCQyATy043XxPUnsD9bMhOeysT+l B1F0oE41uZSwt39bNQ6Tf7GHulbJe0bdI2dszR7d/LXVvwLyZJBB+ZbZiMlNng== 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+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.40 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+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 159711C9A7 X-Spam-Score: -4.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: pElOClWKs0Mv 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.