summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/scripts/refresh.scm12
-rw-r--r--guix/upstream.scm12
2 files changed, 16 insertions, 8 deletions
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)))))))
;;;
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
- (($ <upstream-updater> name description pred latest)
- (and (pred package) latest)))
- updaters))
+ (find (match-lambda
+ (($ <upstream-updater> name description pred latest)
+ (pred package)))
+ updaters))
(define (package-latest-release package 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)
- ((? procedure? latest-release)
- (latest-release package))
+ ((? upstream-updater? updater)
+ ((upstream-updater-latest updater) package))
(_ #f)))
(define (package-latest-release* package updaters)