unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Xinglu Chen <public@yoctocell.xyz>, 50982@debbugs.gnu.org
Subject: [bug#50982] [PATCH] scripts: home/system: Don’t throw an error if no generations exist.
Date: Sun, 03 Oct 2021 10:53:31 +0200	[thread overview]
Message-ID: <dcec2546aea2940cae52274422a643ef5a0189da.camel@telenet.be> (raw)
In-Reply-To: <8c1286034c3a48353d13515f04883dbede289e0c.1633208618.git.public@yoctocell.xyz>

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

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 don't know if the output of "guix system describe" and "guix home describe"
should be an error or warning here ...

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-10-03  8:54 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 [this message]
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   ` bug#50982: " Ludovic Courtès

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=dcec2546aea2940cae52274422a643ef5a0189da.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=50982@debbugs.gnu.org \
    --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).