View previous topic :: View next topic |
Author |
Message |
t0ha n00b


Joined: 04 Sep 2018 Posts: 10
|
Posted: Wed Jun 10, 2020 8:40 pm Post subject: The empty "locale.gen" file in the stage3 archive |
|
|
Hi there.
During installation of the fresh gentoo, I found that locale.gen file doesn't have template like in the handbook steps.
Maybe approach was changed and handbook wasn't updated or its a bug?
Aditional info:
Name of stage file - stage3-amd64-20200607T214504Z
Thanks in advance!
Last edited by t0ha on Sat Jun 13, 2020 8:29 am; edited 3 times in total |
|
Back to top |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 2576 Location: Frankfurt, Germany
|
Posted: Wed Jun 10, 2020 10:04 pm Post subject: |
|
|
I can confirm that ./etc/locale.gen in the current amd64 stage 3 tarball 'stage3-amd64-20200607T214504Z.tar.xz' has the contents below:
I don't know whether it's intended or a mistake. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3609
|
|
Back to top |
|
 |
t0ha n00b


Joined: 04 Sep 2018 Posts: 10
|
Posted: Thu Jun 11, 2020 8:05 pm Post subject: |
|
|
Hi there.
If I understand correctly, the file now including just one locale for "C" lang.
Maybe need to update steps in the handbook, or will it be fixed in the next "stage3" archive?
How can I help in fixing this issue?
Thanks in advance! |
|
Back to top |
|
 |
GDH-gentoo l33t


Joined: 20 Jul 2019 Posts: 601 Location: South America
|
Posted: Thu Jun 11, 2020 8:54 pm Post subject: |
|
|
/etc/locale.gen from the stage3 archive used to have only comments describing how to add locales. This appears to have changed, but you can still add the locales you want like the Handbook describes, and then run locale-gen. It will work.
If you don't know how to add locales, see man locale.gen. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3609
|
Posted: Fri Jun 12, 2020 5:17 am Post subject: |
|
|
t0ha wrote: | How can I help in fixing this issue? |
Each Handbook article has a Discussion page where interested users can add their proposals or comment about obvious mistakes.
Your contribution there for improved wording or obviously missing information is highly appreciated.
Coming closest to your question is this discussion (already "done as of 2020-04-06"). |
|
Back to top |
|
 |
LuxJux Guru

Joined: 01 Mar 2016 Posts: 421 Location: Germany/Berlin
|
Posted: Fri Jun 12, 2020 5:26 pm Post subject: |
|
|
Manually updating system-files always need deep knowledge. _________________ Now, you can breath. After emerge always reboot |
|
Back to top |
|
 |
t0ha n00b


Joined: 04 Sep 2018 Posts: 10
|
Posted: Fri Jun 12, 2020 9:26 pm Post subject: |
|
|
Hi there!
Thanks to all for helping in my question.
I'm very appreciate for your helping!
This topic can be closed.
P.S. Or if you prompt me how, I'll close this topic by myself! |
|
Back to top |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 2576 Location: Frankfurt, Germany
|
Posted: Fri Jun 12, 2020 11:16 pm Post subject: |
|
|
Quote: | P.S. Or if you prompt me how, I'll close this topic by myself! |
That's easy!
Edit your first post (yes, you can do that!) and add "[Solved]" to the Subject field.  |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 16508
|
Posted: Sat Jun 13, 2020 1:06 am Post subject: |
|
|
Topics are marked as solved, but they are not closed. Only moderators and administrators can lock a topic, and that is done only for threads that break the forum rules. |
|
Back to top |
|
 |
LuxJux Guru

Joined: 01 Mar 2016 Posts: 421 Location: Germany/Berlin
|
Posted: Sat Jun 13, 2020 2:19 am Post subject: |
|
|
mike155 wrote: | I can confirm that ./etc/locale.gen in the current amd64 stage 3 tarball 'stage3-amd64-20200607T214504Z.tar.xz' has the contents below:
I don't know whether it's intended or a mistake. |
As far as understanding "locale.gen" has changed to a C++ gentoo language.
Human language selection has to be defined otherplace. _________________ Now, you can breath. After emerge always reboot |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3609
|
Posted: Sat Jun 13, 2020 5:56 am Post subject: |
|
|
LuxJux wrote: | As far as understanding "locale.gen" has changed to a C++ gentoo language. |
You can copy to locale.gen anything supported from /usr/share/i18n/SUPPORTED, then recompile emerge -1avt sys-libs/glibc
With an empty locale.gen file, recompiling sys-libs/glibc would produce all supported locales.
LuxJux wrote: | Human language selection has to be defined otherplace. |
What in detail does that mean? eselect locale? |
|
Back to top |
|
 |
GDH-gentoo l33t


Joined: 20 Jul 2019 Posts: 601 Location: South America
|
Posted: Sat Jun 13, 2020 8:01 pm Post subject: |
|
|
LuxJux wrote: | Manually updating system-files always need deep knowledge. |
LuxJux wrote: | As far as understanding "locale.gen" has changed to a C++ gentoo language.
Human language selection has to be defined otherplace. |
I think you are confused. /etc/locale.gen is a configuration file for the administrator, it has the same format as /usr/share/i18n/SUPPORTED, but it lists only the locales that the administrator wants to install.
"C.UTF-8" means "the POSIX locale, but using UTF-8 for encoding characters".
charles17 wrote: | LuxJux wrote: | As far as understanding "locale.gen" has changed to a C++ gentoo language. |
You can copy to locale.gen anything supported from /usr/share/i18n/SUPPORTED, then recompile emerge -1avt sys-libs/glibc
With an empty locale.gen file, recompiling sys-libs/glibc would produce all supported locales. |
The only requirement is that locale-gen be run (which uses localedef, a POSIX-specified utility implemented by the libc, under the hood). There is no need to reinstall sys-libs/glibc just for this, but, as you say, locale-gen is automatically run indeed during the post-install phase when the GNU libc is reinstalled or upgraded.
There is a difference though: running locale-gen with an /etc/locale.gen file that contains comments and blank lines only is a no-operation; a "No locales found, keeping locale archive" message is displayed and that's it. In sys-libs/glibc's post-install phase though, if /etc/locale.gen contains comments and blank lines only, locale-gen is run with /usr/share/i18n/SUPPORTED as the configuration file, so that does install all supported locales.
Therefore, it makes sense that the file in the stage3 archive contain "C.UTF8 UTF-8". This installs only one locale, and also ensures that it is a UTF-8 locale. But I wish it had kept the explanatory comments it used to contain. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3609
|
Posted: Sat Jun 13, 2020 10:14 pm Post subject: |
|
|
GDH-gentoo wrote: | charles17 wrote: | LuxJux wrote: | As far as understanding "locale.gen" has changed to a C++ gentoo language. |
You can copy to locale.gen anything supported from /usr/share/i18n/SUPPORTED, then recompile emerge -1avt sys-libs/glibc
With an empty locale.gen file, recompiling sys-libs/glibc would produce all supported locales. |
The only requirement is that locale-gen be run (which uses localedef, a POSIX-specified utility implemented by the libc, under the hood). There is no need to reinstall sys-libs/glibc just for this, but, as you say, locale-gen is automatically run indeed during the post-install phase when the GNU libc is reinstalled or upgraded.
There is a difference though: running locale-gen with an /etc/locale.gen file that contains comments and blank lines only is a no-operation; a "No locales found, keeping locale archive" message is displayed and that's it. In sys-libs/glibc's post-install phase though, if /etc/locale.gen contains comments and blank lines only, locale-gen is run with /usr/share/i18n/SUPPORTED as the configuration file, so that does install all supported locales. |
Thanks for the details. The relation between locale-gen and the post-install phase was not clear to me.
GDH-gentoo wrote: | Therefore, it makes sense that the file in the stage3 archive contain "C.UTF8 UTF-8". This installs only one locale, and also ensures that it is a UTF-8 locale. ... |
So using UTF-8 character encoding is standard.
But what could be the reason for keeping (historical?) ISO-8859 stuff listed here and even iso885915 mentioned here?
Is there any use case where an ISO-8859 locale is to be preferred over the corresponding UTF-8 locale? |
|
Back to top |
|
 |
GDH-gentoo l33t


Joined: 20 Jul 2019 Posts: 601 Location: South America
|
Posted: Sat Jun 13, 2020 10:30 pm Post subject: |
|
|
charles17 wrote: | But what could be the reason for keeping (historical?) ISO-8859 stuff listed here and even iso885915 mentioned here?
Is there any use case where an ISO-8859 locale is to be preferred over the corresponding UTF-8 locale? | Well, they are still available, so they can be used if anyone wants. UTF-8 penalizes all languages that aren't English with longer encodings, especially if they don't use the ISO basic Latin alphabet. Other than that, I don't see any particular reason. |
|
Back to top |
|
 |
|