From 32728adb958560268b793b4a3e48d94111b5ed2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 4 Nov 2015 00:08:30 +0100 Subject: [PATCH] import: pypi: Make downloads silent. * guix/import/pypi.scm (pypi-fetch): Wrap body in 'call-with-output-file' and 'with-error-to-port'. --- guix/import/pypi.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index f58efd9915..7ca0cc991e 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -45,7 +45,14 @@ (define (pypi-fetch name) "Return an alist representation of the PyPI metadata for the package NAME, or #f on failure." - (json-fetch (string-append "https://pypi.python.org/pypi/" name "/json"))) + ;; 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-output-file "/dev/null" + (lambda (null) + (with-error-to-port null + (lambda () + (json-fetch (string-append "https://pypi.python.org/pypi/" + name "/json"))))))) (define (latest-source-release pypi-package) "Return the latest source release for PYPI-PACKAGE."