guix-commits
[Top][All Lists]
Advanced

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

01/03: system: image: Set GUIX_LOCPATH and LC_ALL.


From: guix-commits
Subject: 01/03: system: image: Set GUIX_LOCPATH and LC_ALL.
Date: Fri, 24 Apr 2020 13:16:53 -0400 (EDT)

mothacehe pushed a commit to branch wip-disk-image
in repository guix.

commit f3f4f90527c40082440ed415f51cce4b2e6de8df
Author: Mathieu Othacehe <address@hidden>
AuthorDate: Fri Apr 24 13:42:29 2020 +0200

    system: image: Set GUIX_LOCPATH and LC_ALL.
---
 gnu/system/image.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 20d0e47..9554239 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -198,6 +198,12 @@ TYPE (one of 'iso9660 or 'dce).  Return a UUID object."
           (with-imported-modules*
            (let* ((initializer #$(partition-initializer partition)))
              (sql-schema #$schema)
+
+             ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded.
+             (setenv "GUIX_LOCPATH"
+                     #+(file-append glibc-utf8-locales "/lib/locale"))
+             (setlocale LC_ALL "en_US.utf8")
+
              (initializer #$output
                           #:references-graphs '#$graph
                           #:deduplicate? #f
@@ -269,8 +275,8 @@ image ~a {
   (let* ((image-os (image-operating-system image))
          (file-systems-to-keep
           (remove (lambda (fs)
-              (string=? (file-system-mount-point fs) "/"))
-            (operating-system-file-systems image-os)))
+                    (string=? (file-system-mount-point fs) "/"))
+                  (operating-system-file-systems image-os)))
          (os (operating-system
                (inherit image-os)
                (initrd (lambda (file-systems . rest)
@@ -308,6 +314,12 @@ image ~a {
          (root-builder
           (with-imported-modules*
            (sql-schema #$schema)
+
+           ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded.
+           (setenv "GUIX_LOCPATH"
+                   #+(file-append glibc-utf8-locales "/lib/locale"))
+           (setlocale LC_ALL "en_US.utf8")
+
            (initialize-root-partition #$output
                                       #:references-graphs '#$graph
                                       #:deduplicate? #f



reply via email to

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