mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
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').
This commit is contained in:
+9
-6
@@ -264,12 +264,15 @@ them matches."
|
|||||||
#:optional
|
#:optional
|
||||||
(updaters (force %updaters)))
|
(updaters (force %updaters)))
|
||||||
"Return an upstream source to update PACKAGE, a <package> object, or #f if
|
"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
|
none of UPDATERS matches PACKAGE. When several updaters match PACKAGE, try
|
||||||
that the returned source is newer than the current one."
|
them until one of them returns an upstream source. It is the caller's
|
||||||
(match (lookup-updater package updaters)
|
responsibility to ensure that the returned source is newer than the current
|
||||||
((? upstream-updater? updater)
|
one."
|
||||||
((upstream-updater-latest updater) package))
|
(any (match-lambda
|
||||||
(_ #f)))
|
(($ <upstream-updater> name description pred latest)
|
||||||
|
(and (pred package)
|
||||||
|
(latest package))))
|
||||||
|
updaters))
|
||||||
|
|
||||||
(define* (package-latest-release* package
|
(define* (package-latest-release* package
|
||||||
#:optional
|
#:optional
|
||||||
|
|||||||
Reference in New Issue
Block a user