download: Remove old-Guile leftovers.

This is a followup to 36626c556e.

* guix/build/download.scm (http-fetch): Rename 'port-or-bv' to 'port'.
Assume (port? port) is always true, and remove other branch.
This commit is contained in:
Ludovic Courtès 2017-10-16 22:21:02 +02:00
parent 9b396c0cab
commit b3ac341d4e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -774,7 +774,7 @@ (define headers
#:timeout timeout #:timeout timeout
#:verify-certificate? #:verify-certificate?
verify-certificate?)) verify-certificate?))
((resp bv-or-port) ((resp port)
(http-get uri #:port connection #:decode-body? #f (http-get uri #:port connection #:decode-body? #f
#:streaming? #t #:streaming? #t
#:headers headers)) #:headers headers))
@ -787,14 +787,11 @@ (define headers
(begin (begin
(call-with-output-file file (call-with-output-file file
(lambda (p) (lambda (p)
(if (port? bv-or-port) (dump-port* port p
(begin
(dump-port* bv-or-port p
#:buffer-size %http-receive-buffer-size #:buffer-size %http-receive-buffer-size
#:reporter (progress-reporter/file #:reporter (progress-reporter/file
(uri-abbreviation uri) size)) (uri-abbreviation uri) size))
(newline)) (newline)))
(put-bytevector p bv-or-port))))
file)) file))
((301 ; moved permanently ((301 ; moved permanently
302 ; found (redirection) 302 ; found (redirection)