mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
installer: Do not set the locale in run-command.
Installing the locale inside the container, once the cow-store is mounted, causes the process to keep opened locale files that can later prevent the cow-store umount. * gnu/installer/utils.scm (run-command): Remove locale argument. * gnu/installer/final.scm (install-system): Adapt it.
This commit is contained in:
parent
7c923e6cf4
commit
0c9693d8b3
2 changed files with 5 additions and 18 deletions
|
@ -191,9 +191,8 @@ or #f. Return #t on success and #f on failure."
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(with-error-to-file "/dev/console"
|
(with-error-to-file "/dev/console"
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(run-command install-command
|
(run-command install-command)))))
|
||||||
#:locale locale)))))
|
(run-command install-command))))
|
||||||
(run-command install-command #:locale locale))))
|
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; Restart guix-daemon so that it does no keep the MNT namespace
|
;; Restart guix-daemon so that it does no keep the MNT namespace
|
||||||
;; alive.
|
;; alive.
|
||||||
|
|
|
@ -74,9 +74,9 @@ number. If no percentage is found, return #f"
|
||||||
(and result
|
(and result
|
||||||
(string->number (match:substring result 1)))))
|
(string->number (match:substring result 1)))))
|
||||||
|
|
||||||
(define* (run-command command #:key locale)
|
(define* (run-command command)
|
||||||
"Run COMMAND, a list of strings, in the given LOCALE. Return true if
|
"Run COMMAND, a list of strings. Return true if COMMAND exited
|
||||||
COMMAND exited successfully, #f otherwise."
|
successfully, #f otherwise."
|
||||||
(define env (environ))
|
(define env (environ))
|
||||||
|
|
||||||
(define (pause)
|
(define (pause)
|
||||||
|
@ -90,18 +90,6 @@ COMMAND exited successfully, #f otherwise."
|
||||||
|
|
||||||
(setenv "PATH" "/run/current-system/profile/bin")
|
(setenv "PATH" "/run/current-system/profile/bin")
|
||||||
|
|
||||||
(when locale
|
|
||||||
(let ((supported? (false-if-exception
|
|
||||||
(setlocale LC_ALL locale))))
|
|
||||||
;; If LOCALE is not supported, then set LANGUAGE, which might at
|
|
||||||
;; least give us translated messages.
|
|
||||||
(if supported?
|
|
||||||
(setenv "LC_ALL" locale)
|
|
||||||
(setenv "LANGUAGE"
|
|
||||||
(string-take locale
|
|
||||||
(or (string-index locale #\_)
|
|
||||||
(string-length locale)))))))
|
|
||||||
|
|
||||||
(guard (c ((invoke-error? c)
|
(guard (c ((invoke-error? c)
|
||||||
(newline)
|
(newline)
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue