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'.master
parent
34a1783fc1
commit
fb4bf72be3
|
@ -185,8 +185,7 @@ options handled by 'set-build-options-from-command-line', and listed in
|
||||||
#:max-build-jobs (or (assoc-ref opts 'max-jobs) 1)
|
#:max-build-jobs (or (assoc-ref opts 'max-jobs) 1)
|
||||||
#:fallback? (assoc-ref opts 'fallback?)
|
#:fallback? (assoc-ref opts 'fallback?)
|
||||||
#:use-substitutes? (assoc-ref opts 'substitutes?)
|
#:use-substitutes? (assoc-ref opts 'substitutes?)
|
||||||
#:substitute-urls (or (assoc-ref opts 'substitute-urls)
|
#:substitute-urls (assoc-ref opts 'substitute-urls)
|
||||||
%default-substitute-urls)
|
|
||||||
#:use-build-hook? (assoc-ref opts 'build-hook?)
|
#:use-build-hook? (assoc-ref opts 'build-hook?)
|
||||||
#:max-silent-time (assoc-ref opts 'max-silent-time)
|
#:max-silent-time (assoc-ref opts 'max-silent-time)
|
||||||
#:timeout (assoc-ref opts 'timeout)
|
#:timeout (assoc-ref opts 'timeout)
|
||||||
|
@ -512,6 +511,8 @@ arguments with packages that use the specified source."
|
||||||
(urls (map (cut string-append <> "/log")
|
(urls (map (cut string-append <> "/log")
|
||||||
(if (assoc-ref opts 'substitutes?)
|
(if (assoc-ref opts 'substitutes?)
|
||||||
(or (assoc-ref opts 'substitute-urls)
|
(or (assoc-ref opts 'substitute-urls)
|
||||||
|
;; XXX: This does not necessarily match the
|
||||||
|
;; daemon's substitute URLs.
|
||||||
%default-substitute-urls)
|
%default-substitute-urls)
|
||||||
'())))
|
'())))
|
||||||
(roots (filter-map (match-lambda
|
(roots (filter-map (match-lambda
|
||||||
|
|
|
@ -252,8 +252,7 @@ Report the size of PACKAGE and its dependencies.\n"))
|
||||||
(show-version-and-exit "guix size")))))
|
(show-version-and-exit "guix size")))))
|
||||||
|
|
||||||
(define %default-options
|
(define %default-options
|
||||||
`((system . ,(%current-system))
|
`((system . ,(%current-system))))
|
||||||
(substitute-urls . ,%default-substitute-urls)))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
|
@ -501,11 +501,11 @@ encoding conversion errors."
|
||||||
(build-cores (current-processor-count))
|
(build-cores (current-processor-count))
|
||||||
(use-substitutes? #t)
|
(use-substitutes? #t)
|
||||||
|
|
||||||
;; Client-provided substitute URLs. For
|
;; Client-provided substitute URLs. If it is #f,
|
||||||
;; unprivileged clients, these are considered
|
;; the daemon's settings are used. Otherwise, it
|
||||||
;; "untrusted"; for "trusted" users, they override
|
;; overrides the daemons settings; see 'guix
|
||||||
;; the daemon's settings.
|
;; substitute'.
|
||||||
(substitute-urls %default-substitute-urls))
|
(substitute-urls #f))
|
||||||
;; Must be called after `open-connection'.
|
;; Must be called after `open-connection'.
|
||||||
|
|
||||||
(define socket
|
(define socket
|
||||||
|
@ -533,7 +533,10 @@ encoding conversion errors."
|
||||||
(let ((pairs `(,@(if timeout
|
(let ((pairs `(,@(if timeout
|
||||||
`(("build-timeout" . ,(number->string 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))))
|
(send (string-pairs pairs))))
|
||||||
(let loop ((done? (process-stderr server)))
|
(let loop ((done? (process-stderr server)))
|
||||||
(or done? (process-stderr server)))))
|
(or done? (process-stderr server)))))
|
||||||
|
|
Reference in New Issue