summaryrefslogtreecommitdiff
path: root/guix/scripts/substitute.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-17 23:41:37 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-18 00:39:50 +0100
commit4fd06a4dd1d4a894b96e586cef594270f8bbb88f (patch)
treefe9ed8b141d4606e4153e0a476bfb8694b64869d /guix/scripts/substitute.scm
parent36626c556ed75219bce196ac93d148f6b9af984c (diff)
http-client: Avoid name clash with 'open-connection-for-uri' in 2.2.0.
* guix/build/download.scm (open-connection-for-uri): Add note about same-named binding in Guile 2.2.0. * guix/http-client.scm: Use 'guix:open-connection-for-uri' for the procedure coming from (guix build download). * guix/scripts/lint.scm: Likewise. * guix/scripts/substitute.scm: Likewise.
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-xguix/scripts/substitute.scm23
1 files changed, 13 insertions, 10 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 524b019a31..faeb019120 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;;
;;; This file is part of GNU Guix.
@@ -34,7 +34,8 @@
#:use-module ((guix build download)
#:select (current-terminal-columns
progress-proc uri-abbreviation nar-uri-abbreviation
- open-connection-for-uri
+ (open-connection-for-uri
+ . guix:open-connection-for-uri)
close-connection
store-path-abbreviation byte-count->string))
#:use-module (ice-9 rdelim)
@@ -210,8 +211,8 @@ provide."
(close-connection port))))
(begin
(when (or (not port) (port-closed? port))
- (set! port (open-connection-for-uri uri
- #:verify-certificate? #f))
+ (set! port (guix:open-connection-for-uri
+ uri #:verify-certificate? #f))
(unless (or buffered? (not (file-port? port)))
(setvbuf port _IONBF)))
(http-fetch uri #:text? #f #:port port
@@ -247,9 +248,10 @@ failure, return #f and #f."
read-cache-info)
#f))
((http https)
- (let ((port (open-connection-for-uri uri
- #:verify-certificate? #f
- #:timeout %fetch-timeout)))
+ (let ((port (guix:open-connection-for-uri
+ uri
+ #:verify-certificate? #f
+ #:timeout %fetch-timeout)))
(guard (c ((http-get-error? c)
(warning (_ "while fetching '~a': ~a (~s)~%")
(uri->string (http-get-error-uri c))
@@ -533,9 +535,10 @@ initial connection on which HTTP requests are sent."
(result seed))
;; (format (current-error-port) "connecting (~a requests left)..."
;; (length requests))
- (let ((p (or port (open-connection-for-uri base-uri
- #:verify-certificate?
- verify-certificate?))))
+ (let ((p (or port (guix:open-connection-for-uri
+ base-uri
+ #:verify-certificate?
+ verify-certificate?))))
;; For HTTPS, P is not a file port and does not support 'setvbuf'.
(when (file-port? p)
(setvbuf p _IOFBF (expt 2 16)))