From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: [PATCH 1/3] import: hackage: Silence download output. Date: Tue, 22 Mar 2016 22:54:27 -0500 Message-ID: <1458705269-31766-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiZsm-0003HA-MV for guix-devel@gnu.org; Tue, 22 Mar 2016 23:54:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiZsi-0000Wg-Mc for guix-devel@gnu.org; Tue, 22 Mar 2016 23:54:56 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:53448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiZsi-0000WE-E6 for guix-devel@gnu.org; Tue, 22 Mar 2016 23:54:52 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier From: Eric Bavier * guix/import/hackage.scm (hackage-fetch): Send error output from url-fetch to /dev/null. --- guix/import/hackage.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 8725ffa..9401830 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -82,9 +82,14 @@ version." name "-" version "/" name ".cabal") (string-append "http://hackage.haskell.org/package/" name "/" name ".cabal")))) + ;; 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))))))) -- 2.7.3