summaryrefslogtreecommitdiff
path: root/guix/import/elpa.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/elpa.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/elpa.scm')
-rw-r--r--guix/import/elpa.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 1dbdff9391..f9e9f2de53 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; 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.
;;;
@@ -35,6 +36,7 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
+ #:use-module (guix diagnostics)
#:use-module ((guix download) #:select (download-to-store))
#:use-module (guix import utils)
#:use-module (guix http-client)
@@ -400,11 +402,16 @@ type '<elpa-package>'."
(string-drop (package-name package) 6)
(package-name package))))
-(define (latest-release package)
+(define* (latest-release package #:key (version #f))
"Return an <upstream-release> for the latest release of PACKAGE."
(define name (guix-package->elpa-name package))
(define repo (elpa-repository package))
+ (when version
+ (error
+ (formatted-message
+ (G_ "~a updater doesn't support updating to a specific version, sorry.")
+ "elpa")))
(match (elpa-package-info name repo)
(#f
;; No info, perhaps because PACKAGE is not truly an ELPA package.