summaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-01-13 17:50:17 +0100
committerLudovic Courtès <ludo@gnu.org>2016-01-13 18:18:48 +0100
commit8c986ab12034d67db836a881f57c69754d8073ae (patch)
treebf5183011119695ac549d4cfff4dc2175e659397 /guix/scripts/lint.scm
parent203795aceaabec0e0e5818e1650ad407d825d1b3 (diff)
parent7a2eed3aac1ecd0bdf293e33a234fad58f2e5f9e (diff)
downloadguix-patches-8c986ab12034d67db836a881f57c69754d8073ae.tar
guix-patches-8c986ab12034d67db836a881f57c69754d8073ae.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r--guix/scripts/lint.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index f296f8a00e..e2cc965951 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
@@ -593,7 +593,16 @@ Common Platform Enumeration (CPE) name."
(define package-vulnerabilities
(let ((lookup (delay (vulnerabilities->lookup-proc
- (current-vulnerabilities)))))
+ ;; Catch networking errors to allow network-less
+ ;; operation.
+ (catch 'getaddrinfo-error
+ (lambda ()
+ (current-vulnerabilities))
+ (lambda (key errcode)
+ (warn (_ "failed to lookup NIST host: ~a~%")
+ (gai-strerror errcode))
+ (warn (_ "assuming no CVE vulnerabilities~%"))
+ '()))))))
(lambda (package)
"Return a list of vulnerabilities affecting PACKAGE."
((force lookup)