From 7db3ff4a29415ccc4f781c3e2450deb97d51a26f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 23 Aug 2013 15:51:36 +0200 Subject: utils: Add `guile-version>?', and use it. This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge . * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise. --- guix/scripts/substitute-binary.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm index 4a013fe277..97bbfcbce8 100755 --- a/guix/scripts/substitute-binary.scm +++ b/guix/scripts/substitute-binary.scm @@ -155,7 +155,7 @@ provide." ;; and then cancel with: ;; sudo tc qdisc del dev eth0 root (let ((port #f)) - (with-timeout (if (or timeout? (version>? (version) "2.0.5")) + (with-timeout (if (or timeout? (guile-version>? "2.0.5")) %fetch-timeout 0) (begin @@ -417,7 +417,7 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by ;; 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 (version>? (version) "2.0.5") + (if (guile-version>? "2.0.5") (make-custom-binary-input-port "progress-port-proc" read! #f #f (cut close-port port)) -- cgit v1.2.3