guix package: Recover from freshness check transient errors.

* guix/scripts/package.scm (check-package-freshness): Ignore
  `getaddrinfo-error' and `ftp-error' exceptions.
This commit is contained in:
Ludovic Courtès 2013-03-05 22:24:19 +01:00
parent ef010c0f3d
commit 19777ae6ea
1 changed files with 21 additions and 12 deletions

View File

@ -285,6 +285,9 @@ matching packages."
"Check whether PACKAGE has a newer version available upstream, and report
it."
;; TODO: Automatically inject the upstream version when desired.
(catch #t
(lambda ()
(when (gnu-package? package)
(let ((name (package-name package))
(full-name (package-full-name package)))
@ -298,6 +301,12 @@ but ~a is available upstream~%")
(location->string (package-location package))
full-name latest-version)))
(_ #t)))))
(lambda (key . args)
;; Silently ignore networking errors rather than preventing
;; installation.
(case key
((getaddrinfo-error ftp-error) #f)
(else (apply throw key args))))))
;;;