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/scripts/refresh.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 4591d0f308..daf6fcf947 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -368,8 +368,16 @@ the latest known version of ~a (~a)~%") (upstream-source-version source))))))) (#f (when warn? - (warn-no-updater package))))) - + ;; Distinguish between "no updater" and "failing updater." + (match (lookup-updater package updaters) + ((? upstream-updater? updater) + (warning (package-location package) + (G_ "'~a' updater failed to determine available \ +releases for ~a~%") + (upstream-updater-name updater) + (package-name package))) + (#f + (warn-no-updater package))))))) ;;; -- cgit v1.2.3