substitute: Remove buffer handling from fetch.

http-fetch does this, so just set the right option.

* guix/scripts/substitute.scm (fetch): Remove buffering code, and pass
 #:buffered? to http-fetch.
This commit is contained in:
Christopher Baines 2021-01-07 19:36:17 +00:00
parent f1f6e49190
commit fbd61b5d3d
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -204,10 +204,9 @@ (define* (fetch uri #:key (buffered? #t) (timeout? #t)
(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))))))
(else
(leave (G_ "unsupported substitute URI scheme: ~a~%")