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 <upstream-updater>. (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".
This commit is contained in:
parent
36eef80d45
commit
7c101c4c17
|
@ -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)))))))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
|
@ -245,9 +245,9 @@ 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
|
||||
(find (match-lambda
|
||||
(($ <upstream-updater> name description pred latest)
|
||||
(and (pred package) latest)))
|
||||
(pred package)))
|
||||
updaters))
|
||||
|
||||
(define (package-latest-release package updaters)
|
||||
|
@ -255,8 +255,8 @@ them matches."
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue