summaryrefslogtreecommitdiff
path: root/guix/scripts/substitute.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-07 21:51:30 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-10 11:07:51 +0200
commit09d809db6a37502b8cb2fb71748cc8bf500e117f (patch)
treee3ad070986294fbee93264cd7c8af6221b4359f3 /guix/scripts/substitute.scm
parent47c66da00b737b28f27429e472c71cf987409b60 (diff)
Remove assorted Guile 2.0.5 workarounds.
* guix/scripts/authenticate.scm (%default-port-conversion-strategy): Remove. * guix/scripts/substitute.scm (fetch): Remove 2.0.5 special cases. * guix/serialization.scm (write-file): Remove 'scandir' workaround. * guix/ui.scm (command-files): Likewise.
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-xguix/scripts/substitute.scm19
1 files changed, 4 insertions, 15 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 31559b7966..8b4fa36d2a 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -157,15 +157,12 @@ to the caller without emitting an error message."
(leave (_ "download from '~a' failed: ~a, ~s~%")
(uri->string (http-get-error-uri c))
code (http-get-error-reason c))))))
- ;; On Guile 2.0.5, `http-fetch' fetches the whole thing at once. So
- ;; honor TIMEOUT? to disable the timeout when fetching a nar.
- ;;
;; Test this with:
;; sudo tc qdisc add dev eth0 root netem delay 1500ms
;; and then cancel with:
;; sudo tc qdisc del dev eth0 root
(let ((port #f))
- (with-timeout (if (or timeout? (guile-version>? "2.0.5"))
+ (with-timeout (if timeout?
%fetch-timeout
0)
(begin
@@ -649,17 +646,9 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by
;; XXX: We're not in control, so we always return anyway.
n))
- ;; Since `http-fetch' in Guile 2.0.5 returns all the data once it's done,
- ;; don't pretend to report any progress in that case.
- (if (guile-version>? "2.0.5")
- (make-custom-binary-input-port "progress-port-proc"
- read! #f #f
- (cut close-port port))
- (begin
- (format (current-error-port) (_ "Downloading, please wait...~%"))
- (format (current-error-port)
- (_ "(Please consider upgrading Guile to get proper progress report.)~%"))
- port)))
+ (make-custom-binary-input-port "progress-port-proc"
+ read! #f #f
+ (cut close-port port)))
(define-syntax with-networking
(syntax-rules ()