summaryrefslogtreecommitdiff
path: root/guix/import/cran.scm
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2022-06-24 22:01:35 +0200
committerHartmut Goebel <h.goebel@crazy-compilers.com>2022-12-26 17:15:07 +0100
commit21703b5120a1e1c141bcf6114de21944edd944db (patch)
treee867dca69ecd0b690e73b0fcfa103031641b1d41 /guix/import/cran.scm
parent9500c11c8bf4e75894bfe67f839ffdbbf219ae2b (diff)
import: Issue error-message if version is given.
These importer don't support importing a specific version, thus the updater does neither. Issue an error message in case version is given. * guix/import/cpan.scm (latest-release), guix/import/elpa.scm (latest-release), guix/import/hackage.scm (latest-release), guix/import/minetest.scm (latest-minetest-release), guix/import/opam.scm (latest-release): Add #:version argument, issue error if version is given. * guix/import/cran.scm (latest-cran-release): Same. (latest-bioconductor-release) Same. <version>: rename to <latest-version>. * guix/import/stackage.scm (latest-lts-release): For each generated updater, add #:version argument and issue error if version is given.
Diffstat (limited to 'guix/import/cran.scm')
-rw-r--r--guix/import/cran.scm19
1 files changed, 15 insertions, 4 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 473d8c4f5b..1ed3580315 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -693,8 +694,13 @@ s-expression corresponding to that package, or #f on failure."
(_ #f)))
(_ #f)))))
-(define (latest-cran-release pkg)
+(define* (latest-cran-release pkg #:key (version #f))
"Return an <upstream-source> for the latest release of the package PKG."
+ (when version
+ (error
+ (formatted-message
+ (G_ "~a provides only the latest version of each package, sorry.")
+ "CRAN")))
(define upstream-name
(package->upstream-name pkg))
@@ -713,20 +719,25 @@ s-expression corresponding to that package, or #f on failure."
(changed-inputs pkg
(description->package 'cran meta)))))))
-(define (latest-bioconductor-release pkg)
+(define* (latest-bioconductor-release pkg #:key (version #f))
"Return an <upstream-source> for the latest release of the package PKG."
+ (when version
+ (error
+ (formatted-message
+ (G_ "~a provides only the latest version of each package, sorry.")
+ "bioconductor.org")))
(define upstream-name
(package->upstream-name pkg))
- (define version
+ (define latest-version
(latest-bioconductor-package-version upstream-name))
(and version
;; Bioconductor does not provide signatures.
(upstream-source
(package (package-name pkg))
- (version version)
+ (version latest-version)
(urls (bioconductor-uri upstream-name version))
(input-changes
(changed-inputs