guix package: Gracefully handle `official-gnu-packages' failure.
* guix/gnu-maintenance.scm (http-fetch): Error out when DATA is #f. * guix/scripts/package.scm (check-package-freshness): Wrap `gnu-package?' call in `false-if-exception'. Reported by Cyril Roelandt <tipecaml@gmail.com>.master
parent
3be9f724f5
commit
993fb66dd2
|
@ -56,7 +56,20 @@
|
||||||
(response-code resp)))
|
(response-code resp)))
|
||||||
(case code
|
(case code
|
||||||
((200)
|
((200)
|
||||||
data)
|
(if data
|
||||||
|
data
|
||||||
|
(begin
|
||||||
|
;; XXX: Guile 2.0.5 and earlier did not support chunked transfer
|
||||||
|
;; encoding, which is required when fetching %PACKAGE-LIST-URL
|
||||||
|
;; (see <http://lists.gnu.org/archive/html/guile-devel/2011-09/msg00089.html>).
|
||||||
|
;; Since users may still be using these versions, warn them and
|
||||||
|
;; bail out.
|
||||||
|
(format (current-error-port)
|
||||||
|
"warning: using Guile ~a, which does not support HTTP ~s encoding~%"
|
||||||
|
(version)
|
||||||
|
(response-transfer-encoding resp))
|
||||||
|
(error "download failed; use a newer Guile"
|
||||||
|
uri resp))))
|
||||||
(else
|
(else
|
||||||
(error "download failed:" uri code
|
(error "download failed:" uri code
|
||||||
(response-reason-phrase resp))))))
|
(response-reason-phrase resp))))))
|
||||||
|
|
|
@ -288,7 +288,7 @@ it."
|
||||||
|
|
||||||
(catch #t
|
(catch #t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (gnu-package? package)
|
(when (false-if-exception (gnu-package? package))
|
||||||
(let ((name (package-name package))
|
(let ((name (package-name package))
|
||||||
(full-name (package-full-name package)))
|
(full-name (package-full-name package)))
|
||||||
(match (waiting (latest-release name)
|
(match (waiting (latest-release name)
|
||||||
|
|
Reference in New Issue