[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/09: substitute: Set LC_MESSAGES to the client's locale, not LC_ALL.
From: |
guix-commits |
Subject: |
01/09: substitute: Set LC_MESSAGES to the client's locale, not LC_ALL. |
Date: |
Wed, 2 Sep 2020 11:19:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit aba8def46d392b3ef2278d16a2c9708fab05c6fd
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 2 15:53:06 2020 +0200
substitute: Set LC_MESSAGES to the client's locale, not LC_ALL.
Fixes <https://bugs.gnu.org/43039>.
Reported by Adam Griffiths <adam.lw.griffiths@gmail.com>.
Previously, a client could lead 'guix substitute' to run in a non-UTF-8
locale, such as the "C" locale. Consequently, 'guix substitute' would
now fail to decode UTF-8 file names such as those that appear in the
'nss-certs' package.
* guix/scripts/substitute.scm (guix-substitute): Set LC_MESSAGES, not
LC_ALL.
---
guix/scripts/substitute.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index f9d19fd..117d824 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1126,12 +1126,13 @@ default value."
;; Sanity-check SUBSTITUTE-URLS so we can provide a meaningful error message.
(for-each validate-uri (substitute-urls))
- ;; Attempt to install the client's locale, mostly so that messages are
- ;; suitably translated.
+ ;; Attempt to install the client's locale so that messages are suitably
+ ;; translated. LC_CTYPE must be a UTF-8 locale; it's the case by default so
+ ;; don't change it.
(match (or (find-daemon-option "untrusted-locale")
(find-daemon-option "locale"))
(#f #f)
- (locale (false-if-exception (setlocale LC_ALL locale))))
+ (locale (false-if-exception (setlocale LC_MESSAGES locale))))
(catch 'system-error
(lambda ()
- branch master updated (8ce6f4d -> 2056226), guix-commits, 2020/09/02
- 01/09: substitute: Set LC_MESSAGES to the client's locale, not LC_ALL.,
guix-commits <=
- 02/09: store: 'set-build-options' sends LC_MESSAGES, not LC_ALL., guix-commits, 2020/09/02
- 03/09: ui: Attempt to fall back to "en_US.utf8" rather than "C"., guix-commits, 2020/09/02
- 05/09: gnu: Add emacs-next., guix-commits, 2020/09/02
- 07/09: gnu: Add xlsxio, guix-commits, 2020/09/02
- 04/09: gnu: chez-scheme: Install libraries to 'lib/csvX.Y.Z-site', guix-commits, 2020/09/02
- 06/09: gnu: Add gerbil, guix-commits, 2020/09/02
- 08/09: gnu: emacs-calibredb: Update to 2.6.0., guix-commits, 2020/09/02
- 09/09: gnu: Add knockd., guix-commits, 2020/09/02