[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/18: import: launchpad: Allow updating to a specific version.
From: |
guix-commits |
Subject: |
14/18: import: launchpad: Allow updating to a specific version. |
Date: |
Mon, 26 Dec 2022 11:41:43 -0500 (EST) |
htgoebel pushed a commit to branch master
in repository guix.
commit 3986caacae773c7f2f69a013b44d3d64dffe9f50
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Wed Jun 29 10:15:47 2022 +0200
import: launchpad: Allow updating to a specific version.
* guix/import/launchpad.scm (latest-release): Rename to 'import-release',
add #:version argument.
If version is given, return an upstream-source for this version.
---
guix/import/launchpad.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm
index b7e0295c4e..01953ea69c 100644
--- a/guix/import/launchpad.scm
+++ b/guix/import/launchpad.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -121,8 +122,9 @@ for example, 'linuxdcpp'. Return #f if there is no
releases."
(last (remove pre-release? (vector->list (assoc-ref json "entries"))))
"version"))))
-(define (latest-release pkg)
- "Return an <upstream-source> for the latest release of PKG."
+(define* (import-release pkg #:key (version #f))
+ "Return an <upstream-source> for the latest release of PKG. Optionally
+include a VERSION string to fetch a specific version."
(define (origin-launchpad-uri origin)
(match (origin-uri origin)
((? string? url) url) ; surely a Launchpad URL
@@ -132,7 +134,7 @@ for example, 'linuxdcpp'. Return #f if there is no
releases."
(let* ((source-uri (origin-launchpad-uri (package-source pkg)))
(name (package-name pkg))
(repository (launchpad-repository source-uri))
- (newest-version (latest-released-version repository)))
+ (newest-version (or version (latest-released-version repository))))
(if newest-version
(upstream-source
(package name)
@@ -145,4 +147,4 @@ for example, 'linuxdcpp'. Return #f if there is no
releases."
(name 'launchpad)
(description "Updater for Launchpad packages")
(pred launchpad-package?)
- (import latest-release)))
+ (import import-release)))
- 02/18: import: cpan: Remove unused exports., (continued)
- 02/18: import: cpan: Remove unused exports., guix-commits, 2022/12/26
- 03/18: import: Issue error-message if version is given., guix-commits, 2022/12/26
- 10/18: import: github: Allow updating to a specific version., guix-commits, 2022/12/26
- 04/18: import: sourceforge: Issue error-message if version is given., guix-commits, 2022/12/26
- 05/18: gnu-maintenance: Allow updating to a specific version., guix-commits, 2022/12/26
- 07/18: import: egg: Allow updating to a specific version., guix-commits, 2022/12/26
- 09/18: import: git: Allow updating to a specific version., guix-commits, 2022/12/26
- 06/18: import: crate: Allow updating to a specific version., guix-commits, 2022/12/26
- 12/18: import: hexpm: Allow updating to a specific version., guix-commits, 2022/12/26
- 16/18: refresh: Allow updating to a specific version., guix-commits, 2022/12/26
- 14/18: import: launchpad: Allow updating to a specific version.,
guix-commits <=
- 17/18: upstream: Allow updating to a specific version., guix-commits, 2022/12/26
- 11/18: import: gnome: Allow updating to a specific version., guix-commits, 2022/12/26
- 08/18: import: gem: Allow updating to a specific version., guix-commits, 2022/12/26
- 18/18: doc: Describe how to update to a specific version., guix-commits, 2022/12/26
- 13/18: import: kde: Allow updating to a specific version., guix-commits, 2022/12/26
- 15/18: import: pypi: Allow updating to a specific version., guix-commits, 2022/12/26