aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-17 23:07:01 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-18 00:39:49 +0100
commit36626c556ed75219bce196ac93d148f6b9af984c (patch)
tree518c887e6bf45c647e3793534f4ab87b77ddfad8 /guix
parent5461115e8fd9a3181506307b6090716a0d5c202c (diff)
downloadgnu-guix-36626c556ed75219bce196ac93d148f6b9af984c.tar
gnu-guix-36626c556ed75219bce196ac93d148f6b9af984c.tar.gz
build: Require Guile >= 2.0.9.
* configure.ac: Bump requirement to 2.0.9. * doc/guix.texi (Requirements): Adjust accordingly. * README (Requirements): Likewise. * build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>. * guix/build/download.scm: Likewise. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/http-client.scm: Remove workaround for <http://bugs.gnu.org/13095>. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9. * tests/nar.scm: Use (ice-9 control). (let/ec): Remove.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/download.scm29
-rw-r--r--guix/http-client.scm15
-rw-r--r--guix/serialization.scm3
3 files changed, 7 insertions, 40 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index e7a7afecd1..d956a9f33e 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -512,12 +512,6 @@ port if PORT is a TLS session record port."
'set-port-encoding!
(lambda (p e) #f))
-;; XXX: Work around <http://bugs.gnu.org/13095>, present in Guile
-;; up to 2.0.7.
-(module-define! (resolve-module '(web client))
- 'shutdown (const #f))
-
-
;; XXX: Work around <http://bugs.gnu.org/23421>, fixed in Guile commit
;; 16050431f29d56f80c4a8253506fc851b8441840. Guile's date validation
;; procedure rejects dates in which the hour is not padded with a zero but
@@ -682,12 +676,6 @@ the connection could not be established in less than TIMEOUT seconds. Return
FILE on success. When VERIFY-CERTIFICATE? is true, verify HTTPS
certificates; otherwise simply ignore them."
- (define post-2.0.7?
- (or (> (string->number (major-version)) 2)
- (> (string->number (minor-version)) 0)
- (> (string->number (micro-version)) 7)
- (string>? (version) "2.0.7")))
-
(define headers
`(;; Some web sites, such as http://dist.schmorp.de, would block you if
;; there's no 'User-Agent' header, presumably on the assumption that
@@ -712,20 +700,9 @@ certificates; otherwise simply ignore them."
#:verify-certificate?
verify-certificate?))
((resp bv-or-port)
- ;; XXX: `http-get*' was introduced in 2.0.7, and replaced by
- ;; #:streaming? in 2.0.8. We know we're using it within the
- ;; chroot, but `guix-download' might be using a different
- ;; version. So keep this compatibility hack for now.
- (if post-2.0.7?
- (http-get uri #:port connection #:decode-body? #f
- #:streaming? #t
- #:headers headers)
- (if (module-defined? (resolve-interface '(web client))
- 'http-get*)
- (http-get* uri #:port connection #:decode-body? #f
- #:headers headers)
- (http-get uri #:port connection #:decode-body? #f
- #:extra-headers headers))))
+ (http-get uri #:port connection #:decode-body? #f
+ #:streaming? #t
+ #:headers headers))
((code)
(response-code resp))
((size)
diff --git a/guix/http-client.scm b/guix/http-client.scm
index 78d39a0208..855ae95a43 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -217,10 +217,6 @@ or if EOF is reached."
(when (module-variable %web-http 'read-line*)
(module-set! %web-http 'read-line* read-header-line))))
-;; XXX: Work around <http://bugs.gnu.org/13095>, present in Guile
-;; up to 2.0.7.
-(module-define! (resolve-module '(web client))
- 'shutdown (const #f))
(define* (http-fetch uri #:key port (text? #f) (buffered? #t)
keep-alive? (verify-certificate? #t)
@@ -252,14 +248,9 @@ Raise an '&http-get-error' condition if downloading fails."
(unless (or buffered? (not (file-port? port)))
(setvbuf port _IONBF))
(let*-values (((resp data)
- ;; Try hard to use the API du jour to get an input port.
- (if (guile-version>? "2.0.7")
- (http-get uri #:streaming? #t #:port port
- #:keep-alive? #t
- #:headers headers) ; 2.0.9+
- (http-get* uri #:decode-body? text? ; 2.0.7
- #:keep-alive? #t
- #:port port #:headers headers)))
+ (http-get uri #:streaming? #t #:port port
+ #:keep-alive? #t
+ #:headers headers))
((code)
(response-code resp)))
(case code
diff --git a/guix/serialization.scm b/guix/serialization.scm
index 4cab5910f7..4a8cd2086e 100644
--- a/guix/serialization.scm
+++ b/guix/serialization.scm
@@ -130,8 +130,7 @@
;; <http://bugs.gnu.org/19621>. See <http://bugs.gnu.org/19610> for
;; a discussion.
(let ((bv (read-byte-string p)))
- ;; XXX: Rewrite using (ice-9 iconv) when the minimum requirement is
- ;; upgraded to Guile >= 2.0.9.
+ ;; XXX: Rewrite using (ice-9 iconv).
(list->string (map integer->char (bytevector->u8-list bv)))))
(define (read-maybe-utf8-string p)