Hi Maxim

On Tue, 2 Feb 2021 at 15:13, Maxim Cournoyer <maxim.courno...@gmail.com> wrote:

> ./pre-inst-env guix import gnu libsocketcan
> guix import: error: failed to determine latest release of GNU libsocketcan
>
> Thanks for the fix; that's much nicer than a backtrace.  It would be
> even better if it said:
>
> 'guix import: error: No GNU package found for "libsocketcan"'

Yeah, replace the message sounds good.  The one you are proposing
works for both cases: "guix import gnu hello@1.2.3" and "guix import
gnu not-gnu-package".  Even if version is not supported, another
story.
Attached the trivial patch in case.


Cheers,
simon
From 16030b867b9f0e70f3811026ed451d2bba1299d2 Mon Sep 17 00:00:00 2001
From: zimoun <zimon.touto...@gmail.com>
Date: Tue, 2 Feb 2021 15:30:22 +0100
Subject: [PATCH] import: gnu: Fix error message.

* guix/import/gnu.scm (gnu->guix-package): Fix error message.
---
 guix/import/gnu.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm
index c26faff04b..2fa63cb184 100644
--- a/guix/import/gnu.scm
+++ b/guix/import/gnu.scm
@@ -123,7 +123,7 @@ details.)"
           (gnu-package->sexp info release #:key-download key-download)))))
     (_
      (raise (formatted-message
-             (G_ "failed to determine latest release of GNU ~a")
+             (G_ "no GNU package found for ~a")
              name)))))
 
 ;;; gnu.scm ends here
-- 
2.28.0

Reply via email to