M guix/scripts/substitute-binary.scm => guix/scripts/substitute-binary.scm +2 -3
@@ 143,9 143,8 @@ again."
provide."
(case (uri-scheme uri)
((file)
- (let ((port (open-input-file (uri-path uri))))
- (unless buffered?
- (setvbuf port _IONBF))
+ (let ((port (open-file (uri-path uri)
+ (if buffered? "rb" "r0b"))))
(values port (stat:size (stat port)))))
((http)
;; On Guile 2.0.5, `http-fetch' fetches the whole thing at once. So
M tests/utils.scm => tests/utils.scm +1 -1
@@ 103,7 103,7 @@
(test-assert "filtered-port, file"
(let* ((file (search-path %load-path "guix.scm"))
- (input (open-file file "r0")))
+ (input (open-file file "r0b")))
(let*-values (((compressed pids1)
(filtered-port `(,%gzip "-c" "--fast") input))
((decompressed pids2)