M doc/guix.texi => doc/guix.texi +3 -0
@@ 3983,6 3983,9 @@ This means that substitutes may be downloaded from @var{urls}, provided
they are signed by a key authorized by the system administrator
(@pxref{Substitutes}).
+When @var{urls} is the empty string, substitutes are effectively
+disabled.
+
@item --no-substitutes
Do not use substitutes for build products. That is, always build things
locally instead of allowing downloads of pre-built binaries
M guix/scripts/substitute.scm => guix/scripts/substitute.scm +2 -8
@@ 953,15 953,9 @@ substitutes may be unavailable\n")))))
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)
M tests/store.scm => tests/store.scm +5 -1
@@ 450,7 450,11 @@
(with-store s ;the right one again
(set-build-options s #:use-substitutes? #t
#:substitute-urls (%test-substitute-urls))
- (has-substitutes? s o))))))
+ (has-substitutes? s o))
+ (with-store s ;empty list of URLs
+ (set-build-options s #:use-substitutes? #t
+ #:substitute-urls '())
+ (not (has-substitutes? s o)))))))
(test-assert "substitute"
(with-store s