mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
b08cdfc6d3
commit
adf95a810d
6 changed files with 10 additions and 6 deletions
|
@ -28,6 +28,7 @@ (define-module (guix import cpan)
|
|||
#: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 @@ (define cpan-package?
|
|||
(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")))
|
||||
|
|
|
@ -34,6 +34,7 @@ (define-module (guix import elpa)
|
|||
#: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 @@ (define name (guix-package->elpa-name 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")))
|
||||
|
|
|
@ -356,7 +356,7 @@ (define hackage-package?
|
|||
(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")))
|
||||
|
|
|
@ -22,6 +22,7 @@ (define-module (guix import minetest)
|
|||
#: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 @@ (define release (latest-release author/name))
|
|||
(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")))
|
||||
|
|
|
@ -29,6 +29,7 @@ (define-module (guix import opam)
|
|||
#: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 @@ (define (opam-package? package)
|
|||
(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")))
|
||||
|
|
|
@ -145,7 +145,7 @@ (define latest-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")))
|
||||
|
|
Loading…
Reference in a new issue