From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH] Fix Guile version checking in the "web" code. Date: Mon, 10 Jun 2013 10:45:22 +0200 Message-ID: <1370853922-1419-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulxq1-0007Hs-BD for bug-guix@gnu.org; Mon, 10 Jun 2013 04:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ulxpx-0007po-6w for bug-guix@gnu.org; Mon, 10 Jun 2013 04:52:29 -0400 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:44675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulxpx-0007pS-1H for bug-guix@gnu.org; Mon, 10 Jun 2013 04:52:25 -0400 Received: by mail-we0-f180.google.com with SMTP id w56so4680502wes.11 for ; Mon, 10 Jun 2013 01:52:23 -0700 (PDT) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org * guix/web.scm (http-fetch): fix Guile version checking. The previous version would use features from Guile 2.0.9+ when using Guile 2.0.7. --- guix/web.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/guix/web.scm b/guix/web.scm index e9c69cb..d24f158 100644 --- a/guix/web.scm +++ b/guix/web.scm @@ -157,14 +157,13 @@ unbuffered port, suitable for use in `filtered-port'." ;; Try hard to use the API du jour to get an input port. ;; On Guile 2.0.5 and before, we can only get a string or ;; bytevector, and not an input port. Work around that. - (if (version>? "2.0.7" (version)) - (if (defined? 'http-get*) - (http-get* uri #:decode-body? text? - #:port port) ; 2.0.7 - (http-get uri #:decode-body? text? - #:port port)) ; 2.0.5- - (http-get uri #:streaming? #t - #:port port))) ; 2.0.9+ + (if (version>? (version) "2.0.7") + (http-get uri #:streaming? #t #:port port) ; 2.0.9+ + (if (defined? 'http-get*) + (http-get* uri #:decode-body? text? + #:port port) ; 2.0.7 + (http-get uri #:decode-body? text? + #:port port)))) ; 2.0.5- ((code) (response-code resp))) (case code -- 1.7.10.4