mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
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.
This commit is contained in:
parent
f954c9b5da
commit
38f50f49f3
2 changed files with 14 additions and 1 deletions
|
@ -1000,6 +1000,13 @@ (define (guix-substitute . args)
|
||||||
(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 @@ (define* (set-build-options server
|
||||||
(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 @@ (define socket
|
||||||
,@(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)))
|
||||||
|
|
Loading…
Reference in a new issue