lint: 'refresh' gracefully handles lack of networking access.

* guix/scripts/lint.scm (check-for-updates): Wrap
'package-latest-release*' call in 'with-networking-fail-safe'.
This commit is contained in:
Ludovic Courtès 2017-10-27 14:27:47 -07:00
parent 4b879e0acf
commit 6d6d193221
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 5 additions and 1 deletions

View File

@ -869,7 +869,11 @@ the NIST server non-fatal."
(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 (package-latest-release* package (force %updaters)) (match (with-networking-fail-safe
(format #f (G_ "while retrieving upstream info for '~a'")
(package-name package))
#f
(package-latest-release* package (force %updaters)))
((? upstream-source? source) ((? upstream-source? source)
(when (version>? (upstream-source-version source) (when (version>? (upstream-source-version source)
(package-version package)) (package-version package))