GNU bug report logs -
#34480
[PATCH 0/2] Ensure Guix always has 'glibc-utf8-locales'
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Thu, 14 Feb 2019 22:18:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 34480 <at> debbugs.gnu.org (full text, mbox):
This minimizes the risk of locale-related warnings, at least for those
who use one of the bundled UTF-8 locales.
* guix/self.scm (guix-command)[glibc-utf8-locales]: New variable.
In program body, set GUIX_LOCPATH.
---
guix/self.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/guix/self.scm b/guix/self.scm
index a45470a0a6..bcf04a1b28 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -390,6 +390,10 @@ that provide Guile modules."
guile (guile-version (effective-version)))
"Return the 'guix' command such that it adds MODULES and DEPENDENCIES in its
load path."
+ (define glibc-utf8-locales
+ (module-ref (resolve-interface '(gnu packages base))
+ 'glibc-utf8-locales))
+
(define module-directory
;; To minimize the number of 'stat' calls needed to locate a module,
;; create the union of all the module directories.
@@ -410,6 +414,16 @@ load path."
"/site-ccache")
%load-compiled-path))
+ ;; To maximize the chances that locales are set up right
+ ;; out-of-the-box, bundle "common" UTF-8 locales.
+ (let ((locpath (getenv "GUIX_LOCPATH")))
+ (setenv "GUIX_LOCPATH"
+ (string-append (if locpath
+ (string-append locpath ":")
+ "")
+ #$(file-append glibc-utf8-locales
+ "/lib/locale"))))
+
(let ((guix-main (module-ref (resolve-interface '(guix ui))
'guix-main)))
#$(if source
--
2.20.1
This bug report was last modified 6 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.