lint: refresh: Warn about missing or dysfunctional updaters.
This feedback should help us improve updaters. * guix/lint.scm (check-for-updates): Return a warning when PACKAGE lacks an updater or when the updater returns #f.
This commit is contained in:
parent
35ca3cfbcf
commit
709f30b8e4
|
@ -1191,21 +1191,32 @@ (define* (check-vulnerabilities package
|
||||||
|
|
||||||
(define (check-for-updates package)
|
(define (check-for-updates package)
|
||||||
"Check if there is an update available for PACKAGE."
|
"Check if there is an update available for PACKAGE."
|
||||||
(match (with-networking-fail-safe
|
(match (lookup-updater package)
|
||||||
(format #f (G_ "while retrieving upstream info for '~a'")
|
(#f
|
||||||
(package-name package))
|
(list (make-warning package (G_ "no updater for ~a")
|
||||||
#f
|
(list (package-name package))
|
||||||
(package-latest-release* package))
|
#:field 'source)))
|
||||||
((? upstream-source? source)
|
((? upstream-updater? updater)
|
||||||
(if (version>? (upstream-source-version source)
|
(match (with-networking-fail-safe
|
||||||
(package-version package))
|
(format #f (G_ "while retrieving upstream info for '~a'")
|
||||||
(list
|
(package-name package))
|
||||||
(make-warning package
|
#f
|
||||||
(G_ "can be upgraded to ~a")
|
(package-latest-release package))
|
||||||
(list (upstream-source-version source))
|
((? upstream-source? source)
|
||||||
#:field 'version))
|
(if (version>? (upstream-source-version source)
|
||||||
'()))
|
(package-version package))
|
||||||
(#f '()))) ; cannot find newer upstream release
|
(list
|
||||||
|
(make-warning package
|
||||||
|
(G_ "can be upgraded to ~a")
|
||||||
|
(list (upstream-source-version source))
|
||||||
|
#:field 'version))
|
||||||
|
'()))
|
||||||
|
(#f ;cannot find upstream release
|
||||||
|
(list (make-warning package
|
||||||
|
(G_ "updater '~a' failed to find \
|
||||||
|
upstream releases")
|
||||||
|
(list (upstream-updater-name updater))
|
||||||
|
#:field 'source)))))))
|
||||||
|
|
||||||
|
|
||||||
(define (check-archival package)
|
(define (check-archival package)
|
||||||
|
|
Loading…
Reference in a new issue