diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-07-20 16:12:29 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-07-20 23:25:09 +0200 |
commit | b3802495f607fd5e17c5acf0be2ee014036e2464 (patch) | |
tree | e1467d8c0a0042f564b6e0bd5d625651c4617369 /guix | |
parent | 181e0dddd68dc58190bd4831ea5d1ecbd420d83a (diff) |
pack: Build the store database under a UTF-8 locale.
Fixes <https://bugs.gnu.org/42389>.
Reported by branjam4@gmail.com.
* guix/scripts/pack.scm (store-database)[build]: Add calls to 'setenv'
and 'setlocale'.
* tests/pack.scm ("self-contained-tarball + localstatedir, UTF-8 file
names"): New test.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/pack.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 51afaeb379..13ade37515 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -149,6 +149,11 @@ dependencies are registered." (define db-file (store-database-file #:state-directory #$output)) + ;; Make sure non-ASCII file names are properly handled. + (setenv "GUIX_LOCPATH" + #+(file-append glibc-utf8-locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8") + (sql-schema #$schema) (let ((items (append-map read-closure '#$labels))) (with-database db-file db |