From: Mark H Weaver <mhw@netris.org>
To: 30185@debbugs.gnu.org
Subject: bug#30185: [PATCH] [core-updates] Put locales where libc will find them
Date: Sat, 20 Jan 2018 16:22:40 -0500 [thread overview]
Message-ID: <87po64ql7j.fsf@netris.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
On my mips64el-linux GuixSD system, now updated to something close to
core-updates (but with binutils-2.25.1), guile prints this warning:
guile: warning: failed to install locale
and 'locale' prints:
mhw@yeeloong ~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
[...]
strace shows attempts to open files in /run/current-system/locale/2.26,
which was not included in my built system. Instead I have:
/run/current-system/locale/2.26.105-g0890d5379c
This matches the version field of our 'glibc' package in core-updates,
but it's not where libc is looking.
I've attached a patch that fixes the problem for me.
What do you think?
Mark
[-- Attachment #2: [PATCH] system: Put locales where libc will find them --]
[-- Type: text/x-patch, Size: 2263 bytes --]
From cb343d623d31e0687725d37c8585b440ec5144ec Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 20 Jan 2018 01:57:07 -0500
Subject: [PATCH] system: Put locales where libc will find them.
* gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
the major+minor part of the libc version number in the locale directory name.
---
gnu/system/locale.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 75cb855b5..75417f669 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
#:use-module (guix store)
#:use-module (guix records)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (srfi srfi-26)
@@ -90,9 +92,9 @@ or #f on failure."
"--no-archive" "--prefix" #$output
"-i" #$(locale-definition-source locale)
"-f" #$(locale-definition-charset locale)
- (string-append #$output "/"
- #$(package-version libc) "/"
- #$(locale-definition-name locale))))))
+ (string-append #$output "/" #$(version-major+minor
+ (package-version libc))
+ "/" #$(locale-definition-name locale))))))
(define* (single-locale-directory locales
#:key (libc (canonical-package glibc)))
@@ -102,7 +104,7 @@ Because locale data formats are incompatible when switching from one libc to
another, locale data is put in a sub-directory named after the 'version' field
of LIBC."
(define version
- (package-version libc))
+ (version-major+minor (package-version libc)))
(define build
#~(begin
--
2.16.0
next reply other threads:[~2018-01-20 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 21:22 Mark H Weaver [this message]
2018-01-20 21:45 ` bug#30185: [PATCH] [core-updates] Put locales where libc will find them Gábor Boskovits
2018-01-24 14:34 ` Ludovic Courtès
2018-01-24 23:32 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87po64ql7j.fsf@netris.org \
--to=mhw@netris.org \
--cc=30185@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.