From 71e2065a38cf2641b7eb8c557b0f043f5a42a649 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 16 Mar 2016 18:13:02 +0100 Subject: substitute: Honor client-provided empty URL list. Before that, 'guix build --substitute-urls=""' would lead to using the daemon's own URL list instead of the empty list. The 'or*' hack, which is to blame, had become unnecessary since commit fb4bf72be3fbc23bca35ba4b842b7e1517ef0e3a. Reported by Mark H Weaver . * guix/scripts/substitute.scm (or*): Remove. (%cache-urls): Use 'or' instead of 'or*'. * tests/store.scm ("substitute query, alternating URLs"): Add test with empty URL list. * doc/guix.texi (Common Build Options): Mention the empty string. --- guix/scripts/substitute.scm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'guix') diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index b707accff6..1ab18d0260 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -953,15 +953,9 @@ (define (find-daemon-option option) found." (assoc-ref (daemon-options) option)) -(define-syntax-rule (or* a b) - (let ((first a)) - (if (or (not first) (string-null? first)) - b - first))) - (define %cache-urls - (match (and=> (or* (find-daemon-option "untrusted-substitute-urls") ;client - (find-daemon-option "substitute-urls")) ;admin + (match (and=> (or (find-daemon-option "untrusted-substitute-urls") ;client + (find-daemon-option "substitute-urls")) ;admin string-tokenize) ((urls ...) urls) -- cgit v1.2.3