mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
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
1 changed files with 26 additions and 15 deletions
|
@ -1191,21 +1191,32 @@ (define* (check-vulnerabilities package
|
|||
|
||||
(define (check-for-updates package)
|
||||
"Check if there is an update available for PACKAGE."
|
||||
(match (with-networking-fail-safe
|
||||
(format #f (G_ "while retrieving upstream info for '~a'")
|
||||
(package-name package))
|
||||
#f
|
||||
(package-latest-release* package))
|
||||
((? upstream-source? source)
|
||||
(if (version>? (upstream-source-version source)
|
||||
(package-version package))
|
||||
(list
|
||||
(make-warning package
|
||||
(G_ "can be upgraded to ~a")
|
||||
(list (upstream-source-version source))
|
||||
#:field 'version))
|
||||
'()))
|
||||
(#f '()))) ; cannot find newer upstream release
|
||||
(match (lookup-updater package)
|
||||
(#f
|
||||
(list (make-warning package (G_ "no updater for ~a")
|
||||
(list (package-name package))
|
||||
#:field 'source)))
|
||||
((? upstream-updater? updater)
|
||||
(match (with-networking-fail-safe
|
||||
(format #f (G_ "while retrieving upstream info for '~a'")
|
||||
(package-name package))
|
||||
#f
|
||||
(package-latest-release package))
|
||||
((? upstream-source? source)
|
||||
(if (version>? (upstream-source-version source)
|
||||
(package-version package))
|
||||
(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)
|
||||
|
|
Loading…
Reference in a new issue