[email protected] skribis:
> From: Eric Bavier <[email protected]>
>
> * guix/import/hackage.scm (hackage-fetch): Send error output from
> url-fetch to /dev/null.
[...]
> + ;; XXX: We want to silence the download progress report, which is
> + ;; especially annoying for 'guix refresh', but we have to use a file
> port.
> (call-with-temporary-output-file
> (lambda (temp port)
> - (and (url-fetch url temp)
> + (and (call-with-output-file "/dev/null"
> + (lambda (null)
> + (with-error-to-port null
> + (lambda () (url-fetch url temp)))))
> (call-with-input-file temp
> (compose read-cabal canonical-newline-port)))))))
Would it work to directly use:
(let* ((port (http-fetch url)) ;from (guix http-client)
(result (read-cabal (canonical-newline-port port))))
(close-port port)
result)
This avoids the creation of a temporary file.
TIA,
Ludo’.