GNU bug report logs - #47597
[PATCH 0/3] Add SourceForge updater and lint warnings

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sun, 4 Apr 2021 20:59:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 47597 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 47597 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/3] upstream: 'package-latest-release' tries all the matching
 updaters.
Date: Sun,  4 Apr 2021 23:03:15 +0200
* 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 accd8967d8..632e9ebc4f 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
-- 
2.31.1





This bug report was last modified 4 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.