substitute: Install the client's locale.
* guix/store.scm (set-build-options): Add #:locale parameter and honor it. * guix/scripts/substitute.scm (guix-substitute): Install the client's locale.master
parent
f954c9b5da
commit
38f50f49f3
|
@ -1000,6 +1000,13 @@ default value."
|
||||||
(newline)
|
(newline)
|
||||||
(force-output (current-output-port))
|
(force-output (current-output-port))
|
||||||
|
|
||||||
|
;; Attempt to install the client's locale, mostly so that messages are
|
||||||
|
;; suitably translated.
|
||||||
|
(match (or (find-daemon-option "untrusted-locale")
|
||||||
|
(find-daemon-option "locale"))
|
||||||
|
(#f #f)
|
||||||
|
(locale (false-if-exception (setlocale LC_ALL locale))))
|
||||||
|
|
||||||
(with-networking
|
(with-networking
|
||||||
(with-error-handling ; for signature errors
|
(with-error-handling ; for signature errors
|
||||||
(match args
|
(match args
|
||||||
|
|
|
@ -534,7 +534,10 @@ encoding conversion errors."
|
||||||
(substitute-urls #f)
|
(substitute-urls #f)
|
||||||
|
|
||||||
;; Number of columns in the client's terminal.
|
;; Number of columns in the client's terminal.
|
||||||
(terminal-columns (terminal-columns)))
|
(terminal-columns (terminal-columns))
|
||||||
|
|
||||||
|
;; Locale of the client.
|
||||||
|
(locale (false-if-exception (setlocale LC_ALL))))
|
||||||
;; Must be called after `open-connection'.
|
;; Must be called after `open-connection'.
|
||||||
|
|
||||||
(define socket
|
(define socket
|
||||||
|
@ -573,6 +576,9 @@ encoding conversion errors."
|
||||||
,@(if terminal-columns
|
,@(if terminal-columns
|
||||||
`(("terminal-columns"
|
`(("terminal-columns"
|
||||||
. ,(number->string terminal-columns)))
|
. ,(number->string terminal-columns)))
|
||||||
|
'())
|
||||||
|
,@(if locale
|
||||||
|
`(("locale" . ,locale))
|
||||||
'()))))
|
'()))))
|
||||||
(send (string-pairs pairs))))
|
(send (string-pairs pairs))))
|
||||||
(let loop ((done? (process-stderr server)))
|
(let loop ((done? (process-stderr server)))
|
||||||
|
|
Reference in New Issue