summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-12-30 11:31:45 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-01-14 14:29:15 +0100
commit0c9693d8b3f9ecd40732ec86b732bbf99f8e8b4d (patch)
treeafb64e9c5e8fb9b82bd950b5796c1d50bf0aa0a7 /gnu
parent7c923e6cf4412db3ef22792d639b98f8fbf7f037 (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/installer/final.scm5
-rw-r--r--gnu/installer/utils.scm18
2 files changed, 5 insertions, 18 deletions
diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm
index c6987e6e581..bef5f9fd525 100644
--- a/gnu/installer/final.scm
+++ b/gnu/installer/final.scm
@@ -191,9 +191,8 @@ or #f. Return #t on success and #f on failure."
191 (lambda () 191 (lambda ()
192 (with-error-to-file "/dev/console" 192 (with-error-to-file "/dev/console"
193 (lambda () 193 (lambda ()
194 (run-command install-command 194 (run-command install-command)))))
195 #:locale locale))))) 195 (run-command install-command))))
196 (run-command install-command #:locale locale))))
197 (lambda () 196 (lambda ()
198 ;; Restart guix-daemon so that it does no keep the MNT namespace 197 ;; Restart guix-daemon so that it does no keep the MNT namespace
199 ;; alive. 198 ;; alive.
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm
index bb97bc5560d..9bd41e2ca00 100644
--- a/gnu/installer/utils.scm
+++ b/gnu/installer/utils.scm
@@ -74,9 +74,9 @@ number. If no percentage is found, return #f"
74 (and result 74 (and result
75 (string->number (match:substring result 1))))) 75 (string->number (match:substring result 1)))))
76 76
77(define* (run-command command #:key locale) 77(define* (run-command command)
78 "Run COMMAND, a list of strings, in the given LOCALE. Return true if 78 "Run COMMAND, a list of strings. Return true if COMMAND exited
79COMMAND exited successfully, #f otherwise." 79successfully, #f otherwise."
80 (define env (environ)) 80 (define env (environ))
81 81
82 (define (pause) 82 (define (pause)
@@ -90,18 +90,6 @@ COMMAND exited successfully, #f otherwise."
90 90
91 (setenv "PATH" "/run/current-system/profile/bin") 91 (setenv "PATH" "/run/current-system/profile/bin")
92 92
93 (when locale
94 (let ((supported? (false-if-exception
95 (setlocale LC_ALL locale))))
96 ;; If LOCALE is not supported, then set LANGUAGE, which might at
97 ;; least give us translated messages.
98 (if supported?
99 (setenv "LC_ALL" locale)
100 (setenv "LANGUAGE"
101 (string-take locale
102 (or (string-index locale #\_)
103 (string-length locale)))))))
104
105 (guard (c ((invoke-error? c) 93 (guard (c ((invoke-error? c)
106 (newline) 94 (newline)
107 (format (current-error-port) 95 (format (current-error-port)