From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 50982-done@debbugs.gnu.org, Xinglu Chen <public@yoctocell.xyz>
Subject: bug#50982: [PATCH] scripts: home/system: Don’t throw an error if no generations exist.
Date: Thu, 06 Jan 2022 11:28:22 +0100 [thread overview]
Message-ID: <877dbdf9a1.fsf_-_@gnu.org> (raw)
In-Reply-To: <dcec2546aea2940cae52274422a643ef5a0189da.camel@telenet.be> (Maxime Devos's message of "Sun, 03 Oct 2021 10:53:31 +0200")
Maxime Devos <maximedevos@telenet.be> skribis:
> 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 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
>
> 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
> ‘guix show: error: i-do-not-exist: package not found’.
>
> 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 packages).
I’ve done that now, thanks!
Ludo’.
prev parent reply other threads:[~2022-01-06 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-02 21:05 [bug#50982] [PATCH] scripts: home/system: Don’t throw an error if no generations exist Xinglu Chen
2021-10-03 8:53 ` Maxime Devos
2021-10-19 13:59 ` Ludovic Courtès
2021-10-30 11:18 ` Xinglu Chen
2021-10-30 14:24 ` Ludovic Courtès
2022-01-06 10:28 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dbdf9a1.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=50982-done@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
--cc=public@yoctocell.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).