Summary: | sys-libs/glibc-2.29-r2 - /usr/sbin/locale-gen returns "success" when it fails to generate locales based on a corrupt /etc/locale.gen | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chris Slycord <cslycord> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceware.org/PR25195 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
locale-gen output along with success from $? locale-gen output redirected to file locale.gen (with windows line endings) |
Description
Chris Slycord
2019-10-17 06:30:58 UTC
Please post your `emerge --info' output in a comment. Created attachment 592972 [details]
emerge --info
Created attachment 592974 [details]
locale-gen output along with success from $?
Created attachment 592976 [details]
locale-gen output redirected to file
If it helps, this shows that it's trying to use the unprintable "^M" character at the end of each name/line from /etc/locale.gen, since they were erroneously placed in the file.
Can you also attach broken locale.gen? Created attachment 593758 [details]
locale.gen (with windows line endings)
locale-gen failed with this file. But returned success.
Confirmed locally. The output is in the form: sf / # locale-gen * Generating 5 locales (this might take a while) with 8 jobs ...(3/5) Generating ko_KR.EUC-KR failed to set locale! ' not found: No such file or directory failed to set locale! /usr/share/i18n/locales/ko_KR:6141: LC_TIME: unknown character in field `abday' failed to set locale! ... [error] LC_MESSAGES: value for field `noexpr' must not be an empty string [ ok ] ...(2/5) Generating en_US.UTF-8 failed to set locale! ' not found: No such file or directory [ ok ] * Generation complete * Adding locales to archive ... [ ok ] sf / # locate locale-gen Looks like it's at least a deficiency in localedef's exit status: # /usr/bin/localedef -c --no-archive -i en_US -f $'ISO-8859-1\r' -A /usr/share/locale/locale.alias --prefix / en_US failed to set locale! ' not found: No such file or directory # echo $? 0 Fun fact: $'\r' actually masks full error: # /usr/bin/localedef -c --no-archive -i en_US -f $'ISO-8859-1\r' -A /usr/share/locale/locale.alias --prefix / en_US 2>&1 | cat -v failed to set locale! [error] character map file `ISO-8859-1^M' not found: No such file or directory 'man localedef' says: """ EXIT STATUS One of the following exit values can be returned by localedef: 0 Command completed successfully. 1 Warnings or errors occurred, output files were written. 4 Errors encountered, no output created. """ I think we should have received at least '1' if not '4'. I declare it a localedef bug. Filed upstream bug as https://sourceware.org/PR25195 In upstream bug Carlos discovered we are using '-c' option. Let's try to get rid of that. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1968d85e42382fa4820f6978e116abe091ac4825 commit 1968d85e42382fa4820f6978e116abe091ac4825 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-21 07:53:41 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-21 07:53:56 +0000 sys-libs/glibc: drop -c (--force) flag from localedef As found out in https://sourceware.org/PR25195 -c/--force makes 'localedef' to ignore all errors. The change drops -c flag and relies on clean run. Reported-by: Chris Slycord Bug: https://bugs.gentoo.org/697908 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/glibc/Manifest | 2 +- sys-libs/glibc/glibc-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Let's close it as fixed and get that fix into glibc-2.31. As it was broken forever I suggest not to spent much time to port it back. |