From 7c101c4c175b7abcb43279d1c66b41a91b9c64bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 9 Sep 2019 10:33:42 +0200 Subject: refresh: Distinguish between "no updater" and "failing updater". Previously, something like "guix refresh texmacs" would report "no updater". Now, it reports that the 'gnu-ftp' updater failed to list releases. * guix/upstream.scm (lookup-updater): Use 'find' instead of 'any' to return the . (package-latest-release): Adjust accordingly. * guix/scripts/refresh.scm (check-for-package-update): When 'package-latest-release' returns #f, distinguish between "no updater" and "failing updater". --- guix/upstream.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'guix/upstream.scm') diff --git a/guix/upstream.scm b/guix/upstream.scm index d4f9c5bb45..aa47dab4b4 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -245,18 +245,18 @@ correspond to the same version." (define (lookup-updater package updaters) "Return an updater among UPDATERS that matches PACKAGE, or #f if none of them matches." - (any (match-lambda - (($ name description pred latest) - (and (pred package) latest))) - updaters)) + (find (match-lambda + (($ name description pred latest) + (pred package))) + updaters)) (define (package-latest-release package updaters) "Return an upstream source to update PACKAGE, a 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) - ((? procedure? latest-release) - (latest-release package)) + ((? upstream-updater? updater) + ((upstream-updater-latest updater) package)) (_ #f))) (define (package-latest-release* package updaters) -- cgit v1.2.3