diff mbox series

[bug#45409,v4,01/13] substitute: Remove buffer handling from fetch.

Message ID 20210116135803.21955-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#45409,v4,01/13] substitute: Remove buffer handling from fetch. | expand


Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Christopher Baines Jan. 16, 2021, 1:57 p.m. UTC
http-fetch does this, so just set the right option.

* guix/scripts/substitute.scm (fetch): Remove buffering code, and pass
 #:buffered? to http-fetch.
 guix/scripts/substitute.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 2eefdb79d8..aaafb5d605 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -204,10 +204,9 @@  connection (typically PORT) is kept open once data has been fetched from URI."
              (when (or (not port) (port-closed? port))
                (set! port (guix:open-connection-for-uri
                            uri #:verify-certificate? #f)))
-             (unless (or buffered? (not (file-port? port)))
-               (setvbuf port 'none))
              (http-fetch uri #:text? #f #:port port
                          #:keep-alive? keep-alive?
+                         #:buffered? buffered?
                          #:verify-certificate? #f))))))
      (leave (G_ "unsupported substitute URI scheme: ~a~%")