[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: import: elpa: Do not abort when failing to download the archive.
From: |
Ludovic Courtès |
Subject: |
05/06: import: elpa: Do not abort when failing to download the archive. |
Date: |
Sat, 28 Oct 2017 03:46:12 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 0a2ce1ea0ad2f1269cba3f77a77bb336ba2ef0b3
Author: Ludovic Courtès <address@hidden>
Date: Fri Oct 27 14:43:19 2017 -0700
import: elpa: Do not abort when failing to download the archive.
* guix/import/elpa.scm (elpa-fetch-archive): Use 'http-fetch/cached'
directly instead of 'call-with-downloaded-file'. This ensures we don't
just abort when networking access is lacking, which is required to allow
'guix refresh -c refresh' to proceed.
---
guix/import/elpa.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 858eea8..45a4192 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -80,8 +80,11 @@ NAMES (strings)."
(cut string-append <> "/archive-contents"))))
(if url
;; Use a relatively small TTL for the archive itself.
- (parameterize ((%http-cache-ttl (* 6 3600)))
- (call-with-downloaded-file url read))
+ (let* ((port (http-fetch/cached (string->uri url)
+ #:ttl (* 6 3600)))
+ (data (read port)))
+ (close-port port)
+ data)
(leave (G_ "~A: currently not supported~%") repo))))
(define* (call-with-downloaded-file url proc #:optional (error-thunk #f))
- branch master updated (ed1f071 -> 34b1f33), Ludovic Courtès, 2017/10/28
- 02/06: lint: Extract network-related exception handling., Ludovic Courtès, 2017/10/28
- 06/06: graph: Remove mention of Graphviz from the summary line., Ludovic Courtès, 2017/10/28
- 05/06: import: elpa: Do not abort when failing to download the archive.,
Ludovic Courtès <=
- 04/06: import: github: Gracefully handle multiple-URL origins., Ludovic Courtès, 2017/10/28
- 03/06: lint: 'refresh' gracefully handles lack of networking access., Ludovic Courtès, 2017/10/28
- 01/06: scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'., Ludovic Courtès, 2017/10/28