aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-10-27 14:27:47 -0700
committerLudovic Courtès <ludo@gnu.org>2017-10-28 09:45:54 +0200
commit6d6d19322124dcd963e801453ed026620634d0b3 (patch)
tree956e886dac3b345933a47fa3fbba9e9183f9536f /guix/scripts/lint.scm
parent4b879e0acf30e7ac941cff5581107b23c29e1883 (diff)
downloadguix-6d6d19322124dcd963e801453ed026620634d0b3.tar
guix-6d6d19322124dcd963e801453ed026620634d0b3.tar.gz
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'.
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r--guix/scripts/lint.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index ec6446ef47..8840b1acb5 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -869,7 +869,11 @@ the NIST server non-fatal."
(define (check-for-updates 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)
(when (version>? (upstream-source-version source)
(package-version package))