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:
parent
ef010c0f3d
commit
19777ae6ea
|
@ -285,19 +285,28 @@ matching packages."
|
||||||
"Check whether PACKAGE has a newer version available upstream, and report
|
"Check whether PACKAGE has a newer version available upstream, and report
|
||||||
it."
|
it."
|
||||||
;; TODO: Automatically inject the upstream version when desired.
|
;; TODO: Automatically inject the upstream version when desired.
|
||||||
(when (gnu-package? package)
|
|
||||||
(let ((name (package-name package))
|
(catch #t
|
||||||
(full-name (package-full-name package)))
|
(lambda ()
|
||||||
(match (waiting (latest-release name)
|
(when (gnu-package? package)
|
||||||
(_ "looking for the latest release of GNU ~a...") name)
|
(let ((name (package-name package))
|
||||||
((latest-version . _)
|
(full-name (package-full-name package)))
|
||||||
(when (version>? latest-version full-name)
|
(match (waiting (latest-release name)
|
||||||
(format (current-error-port)
|
(_ "looking for the latest release of GNU ~a...") name)
|
||||||
(_ "~a: note: using ~a \
|
((latest-version . _)
|
||||||
|
(when (version>? latest-version full-name)
|
||||||
|
(format (current-error-port)
|
||||||
|
(_ "~a: note: using ~a \
|
||||||
but ~a is available upstream~%")
|
but ~a is available upstream~%")
|
||||||
(location->string (package-location package))
|
(location->string (package-location package))
|
||||||
full-name latest-version)))
|
full-name latest-version)))
|
||||||
(_ #t)))))
|
(_ #t)))))
|
||||||
|
(lambda (key . args)
|
||||||
|
;; Silently ignore networking errors rather than preventing
|
||||||
|
;; installation.
|
||||||
|
(case key
|
||||||
|
((getaddrinfo-error ftp-error) #f)
|
||||||
|
(else (apply throw key args))))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Reference in New Issue