diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-04-07 18:11:21 +0200 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-04-12 08:29:26 -0400 |
commit | ea4a66b2afa401cc92a87a8754c75022bdf0e5d5 (patch) | |
tree | 60605855d5c3b3e5e4bbb816697486fa95fe8fe7 | |
parent | f77466ad20aa8dae09e644a6c9354a778fa15085 (diff) | |
download | guix-ea4a66b2afa401cc92a87a8754c75022bdf0e5d5.tar guix-ea4a66b2afa401cc92a87a8754c75022bdf0e5d5.tar.gz |
import: Properly report "no specific version" errors.
* guix/import/cpan.scm (latest-release): Use 'raise' instead of
'error'.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/minetest.scm (latest-minetest-release): Likewise.
* guix/import/opam.scm (latest-release): Likewise.
* guix/import/stackage.scm (latest-lts-release): Likewise.
-rw-r--r-- | guix/import/cpan.scm | 3 | ||||
-rw-r--r-- | guix/import/elpa.scm | 3 | ||||
-rw-r--r-- | guix/import/hackage.scm | 2 | ||||
-rw-r--r-- | guix/import/minetest.scm | 3 | ||||
-rw-r--r-- | guix/import/opam.scm | 3 | ||||
-rw-r--r-- | guix/import/stackage.scm | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index eeb142a9b8..da47018c35 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -28,6 +28,7 @@ #:use-module ((ice-9 rdelim) #:select (read-line)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (json) #:use-module (gcrypt hash) #:use-module (guix diagnostics) @@ -310,7 +311,7 @@ in RELEASE, a <cpan-release> record." (define* (latest-release package #:key (version #f)) "Return an <upstream-source> for the latest release of PACKAGE." (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "cpan"))) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index f71e758db4..8ebebcafb3 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -34,6 +34,7 @@ #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -405,7 +406,7 @@ type '<elpa-package>'." (define repo (elpa-repository package)) (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "elpa"))) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 83ad85f3fe..56c8696ad7 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -356,7 +356,7 @@ respectively." (define* (latest-release package #:key (version #f)) "Return an <upstream-source> for the latest release of PACKAGE." (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "hackage"))) diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm index 7e7b6dd6ac..5ea6e023ce 100644 --- a/guix/import/minetest.scm +++ b/guix/import/minetest.scm @@ -22,6 +22,7 @@ #:use-module (ice-9 threads) #:use-module (ice-9 hash-table) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-34) #:use-module (guix diagnostics) #:use-module ((guix packages) #:prefix package:) #:use-module (guix upstream) @@ -492,7 +493,7 @@ or #false if the latest release couldn't be determined." (define source (package:package-source pkg)) (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "minetest"))) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index e336936306..eed68e7a93 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -29,6 +29,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-2) #:use-module ((srfi srfi-26) #:select (cut)) + #:use-module (srfi srfi-34) #:use-module ((web uri) #:select (string->uri uri->string)) #:use-module ((guix build utils) #:select (dump-port find-files mkdir-p)) #:use-module (guix build-system) @@ -417,7 +418,7 @@ package in OPAM." (define* (latest-release package #:key (version #f)) "Return an <upstream-source> for the latest release of PACKAGE." (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "opam"))) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index 735eeb75f7..f98b86c334 100644 --- a/guix/import/stackage.scm +++ b/guix/import/stackage.scm @@ -145,7 +145,7 @@ included in the Stackage LTS release." "Return an <upstream-source> for the latest Stackage LTS release of PACKAGE or #f if the package is not included in the Stackage LTS release." (when version - (error + (raise (formatted-message (G_ "~a updater doesn't support updating to a specific version, sorry.") "stackage"))) |