[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: upstream: 'package-latest-release' tries all the matching updater
From: |
guix-commits |
Subject: |
02/06: upstream: 'package-latest-release' tries all the matching updaters. |
Date: |
Tue, 6 Apr 2021 18:00:40 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 35ca3cfbcf6018cee94c6f458a74cfd814747812
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Apr 4 22:44:41 2021 +0200
upstream: 'package-latest-release' tries all the matching updaters.
* guix/upstream.scm (package-latest-release): Try UPDATERS until one of
them returns an upstream source. This is useful for packages with
several matching updaters, such a zlib ('sourceforge' and
'generic-html').
---
guix/upstream.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/guix/upstream.scm b/guix/upstream.scm
index accd896..632e9eb 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -264,12 +264,15 @@ them matches."
#:optional
(updaters (force %updaters)))
"Return an upstream source to update PACKAGE, a <package> object, or #f if
-none of UPDATERS matches PACKAGE. It is the caller's responsibility to ensure
-that the returned source is newer than the current one."
- (match (lookup-updater package updaters)
- ((? upstream-updater? updater)
- ((upstream-updater-latest updater) package))
- (_ #f)))
+none of UPDATERS matches PACKAGE. When several updaters match PACKAGE, try
+them until one of them returns an upstream source. It is the caller's
+responsibility to ensure that the returned source is newer than the current
+one."
+ (any (match-lambda
+ (($ <upstream-updater> name description pred latest)
+ (and (pred package)
+ (latest package))))
+ updaters))
(define* (package-latest-release* package
#:optional
- branch master updated (10b01e7 -> ee9c44c), guix-commits, 2021/04/06
- 01/06: gnu-maintenance: Add 'sourceforge' updater., guix-commits, 2021/04/06
- 05/06: services: dovecot: Fix serialization of a free-form-args arguments., guix-commits, 2021/04/06
- 04/06: gnu: Add opensmtpd-filter-rspamd., guix-commits, 2021/04/06
- 02/06: upstream: 'package-latest-release' tries all the matching updaters.,
guix-commits <=
- 03/06: lint: refresh: Warn about missing or dysfunctional updaters., guix-commits, 2021/04/06
- 06/06: gnu: Add camlidl., guix-commits, 2021/04/06