summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-28 15:20:06 +0100
committerLudovic Courtès <ludo@gnu.org>2015-10-28 15:31:44 +0100
commitfb4bf72be3fbc23bca35ba4b842b7e1517ef0e3a (patch)
tree4d6cb0a5bf3d97222d8697976f1cc4b42c321d2c /guix/store.scm
parent34a1783fc1498d7150210da22dd7804d288438b3 (diff)
store: Use the daemon's substitute URLs by default.
Partly fixes <http://bugs.gnu.org/20217>. * guix/store.scm (set-build-options): Change #:substitute-urls to default to #f. Send the 'substitute-urls' pair only if SUBSTITUTE-URLS is true. * guix/scripts/build.scm (set-build-options-from-command-line): Do not default to %DEFAULT-SUBSTITUTE-URLS for #:substitute-urls. * guix/scripts/size.scm (%default-options): Remove 'substitute-urls'.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm15
1 files changed, 9 insertions, 6 deletions
diff --git a/guix/store.scm b/guix/store.scm
index c4e3573711..8413d1f452 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -501,11 +501,11 @@ encoding conversion errors."
(build-cores (current-processor-count))
(use-substitutes? #t)
- ;; Client-provided substitute URLs. For
- ;; unprivileged clients, these are considered
- ;; "untrusted"; for "trusted" users, they override
- ;; the daemon's settings.
- (substitute-urls %default-substitute-urls))
+ ;; Client-provided substitute URLs. If it is #f,
+ ;; the daemon's settings are used. Otherwise, it
+ ;; overrides the daemons settings; see 'guix
+ ;; substitute'.
+ (substitute-urls #f))
;; Must be called after `open-connection'.
(define socket
@@ -533,7 +533,10 @@ encoding conversion errors."
(let ((pairs `(,@(if timeout
`(("build-timeout" . ,(number->string timeout)))
'())
- ("substitute-urls" . ,(string-join substitute-urls)))))
+ ,@(if substitute-urls
+ `(("substitute-urls"
+ . ,(string-join substitute-urls)))
+ '()))))
(send (string-pairs pairs))))
(let loop ((done? (process-stderr server)))
(or done? (process-stderr server)))))