summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorzimoun <zimon.toutoune@gmail.com>2021-01-28 00:46:02 +0100
committerLudovic Courtès <ludo@gnu.org>2021-01-31 21:49:59 +0100
commit460e7d8bc9fd06699c19d998605cf163575b247c (patch)
treeea0b9e10fdf3c7fce87e08b6a30a3c6b7c50cc30 /guix
parentbe84fc600e76e3962123b94bf14baea4a2e4f442 (diff)
import: gnu: Mention package name upon failure.
* guix/import/gnu.scm (gnu->guix-package): Use 'formatted-message' and mention the package name in error messages. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/import/gnu.scm16
1 files changed, 9 insertions, 7 deletions
diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm
index 29324d7554..c26faff04b 100644
--- a/guix/import/gnu.scm
+++ b/guix/import/gnu.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,8 +18,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix import gnu)
+ #:use-module ((guix diagnostics) #:select (formatted-message))
#:use-module (guix gnu-maintenance)
#:use-module (guix import utils)
+ #:use-module (guix i18n)
#:use-module (guix utils)
#:use-module (guix store)
#:use-module (gcrypt hash)
@@ -113,15 +116,14 @@ details.)"
(let ((version (upstream-source-version release)))
(match (find-package name)
(#f
- (raise (condition
- (&message
- (message "couldn't find meta-data for GNU package")))))
+ (raise (formatted-message
+ (G_ "couldn't find meta-data for GNU ~a")
+ name)))
(info
(gnu-package->sexp info release #:key-download key-download)))))
(_
- (raise (condition
- (&message
- (message
- "failed to determine latest release of GNU package")))))))
+ (raise (formatted-message
+ (G_ "failed to determine latest release of GNU ~a")
+ name)))))
;;; gnu.scm ends here