[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version
From: |
Hartmut Goebel |
Subject: |
[bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version (launchpad) |
Date: |
Sun, 28 Aug 2022 15:18:39 +0200 |
* guix/import/launchpad.scm(latest-release): Rename to (import-release),
add keyword-argument 'version'.
If version is given, return an upstream-source for this version.
---
guix/import/launchpad.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm
index b7e0295c4e..2112eefe1d 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,7 +122,7 @@ 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)
+(define* (import-release pkg #:key (version #f))
"Return an <upstream-source> for the latest release of PKG."
(define (origin-launchpad-uri origin)
(match (origin-uri origin)
@@ -132,7 +133,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 +146,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)))
--
2.30.4
- [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate), (continued)
- [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 07/20] refresh: Allow updating to a specific version (egg), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 10/20] refresh: Allow updating to a specific version (gnome), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 12/20] refresh: Allow updating to a specific version (kde), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 15/20] refresh: Allow updating to a specific version (script), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 09/20] refresh: Allow updating to a specific version (github), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 08/20] refresh: Allow updating to a specific version (git), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version (launchpad),
Hartmut Goebel <=
- [bug#57460] [PATCH 16/20] refresh: Allow updating to a specific version (upstream), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 17/20] refresh: Allow updating to a specific version (documentation), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 18/20] TEMP REMOVE import: git: Restrict to non-github origins., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 19/20] TEMP REMOVE upstream: Output names of importers tried., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 20/20] TEMP REMOVE Add test-script for refesh-with-version, Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 00/19] Refresh to specific version, Maxime Devos, 2022/08/28