mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 14:28:15 -05:00
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>
This commit is contained in:
parent
be84fc600e
commit
460e7d8bc9
1 changed files with 9 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -17,8 +18,10 @@
|
||||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (guix import gnu)
|
(define-module (guix import gnu)
|
||||||
|
#:use-module ((guix diagnostics) #:select (formatted-message))
|
||||||
#:use-module (guix gnu-maintenance)
|
#:use-module (guix gnu-maintenance)
|
||||||
#:use-module (guix import utils)
|
#:use-module (guix import utils)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (gcrypt hash)
|
#:use-module (gcrypt hash)
|
||||||
|
@ -113,15 +116,14 @@ (define* (gnu->guix-package name
|
||||||
(let ((version (upstream-source-version release)))
|
(let ((version (upstream-source-version release)))
|
||||||
(match (find-package name)
|
(match (find-package name)
|
||||||
(#f
|
(#f
|
||||||
(raise (condition
|
(raise (formatted-message
|
||||||
(&message
|
(G_ "couldn't find meta-data for GNU ~a")
|
||||||
(message "couldn't find meta-data for GNU package")))))
|
name)))
|
||||||
(info
|
(info
|
||||||
(gnu-package->sexp info release #:key-download key-download)))))
|
(gnu-package->sexp info release #:key-download key-download)))))
|
||||||
(_
|
(_
|
||||||
(raise (condition
|
(raise (formatted-message
|
||||||
(&message
|
(G_ "failed to determine latest release of GNU ~a")
|
||||||
(message
|
name)))))
|
||||||
"failed to determine latest release of GNU package")))))))
|
|
||||||
|
|
||||||
;;; gnu.scm ends here
|
;;; gnu.scm ends here
|
||||||
|
|
Loading…
Reference in a new issue