guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: installer: Fix locale installation.


From: guix-commits
Subject: 01/01: installer: Fix locale installation.
Date: Sat, 24 Nov 2018 00:07:16 -0500 (EST)

mothacehe pushed a commit to branch wip-newt-installer
in repository guix.

commit 29263f2c4017fd4f5f103544fae78002013adac7
Author: Mathieu Othacehe <address@hidden>
Date:   Sat Nov 24 14:06:40 2018 +0900

    installer: Fix locale installation.
    
    For some mysterious reason, calling 'setlocale' as first instruction of
    installer-builder does not install unicode support correctly. So set LANG 
env
    variable and start the installer until this is understood.
    
    * gnu/installer.scm (installer-program): Wrap installer-builder to have the
    opportunity to set LANG environment variable before starting the installer.
---
 gnu/installer.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gnu/installer.scm b/gnu/installer.scm
index 9e773ee..b3eb2a6 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -261,9 +261,6 @@ selected keymap."
                          (guix build utils)
                          (ice-9 match))
 
-            ;; Set the default locale to install unicode support.
-            (setlocale LC_ALL "en_US.utf8")
-
             ;; Initialize gettext support so that installers can use
             ;; (guix i18n) module.
             #$init-gettext
@@ -295,4 +292,11 @@ selected keymap."
                   (primitive-exit 1))))
             ((installer-exit current-installer))))))
 
-  (program-file "installer" installer-builder))
+  (program-file
+   "installer"
+   #~(begin
+       ;; Set the default locale to install unicode support.  For
+       ;; some reason, unicode support is not correctly installed
+       ;; when calling this in 'installer-builder'.
+       (setenv "LANG" "en_US.UTF-8")
+       (system #$(program-file "installer-real" installer-builder)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]