Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] The empty "locale.gen" file in the stage3 archive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
t0ha
n00b
n00b


Joined: 04 Sep 2018
Posts: 10

PostPosted: Wed Jun 10, 2020 8:40 pm    Post subject: The empty "locale.gen" file in the stage3 archive Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2353
Location: Frankfurt, Germany

PostPosted: Wed Jun 10, 2020 10:04 pm    Post subject: Reply with quote

I can confirm that ./etc/locale.gen in the current amd64 stage 3 tarball 'stage3-amd64-20200607T214504Z.tar.xz' has the contents below:
Code:

C.UTF8 UTF-8


I don't know whether it's intended or a mistake.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3487

PostPosted: Thu Jun 11, 2020 7:49 am    Post subject: Reply with quote

Guess it's from bug 714906.
Does it need an update for https://wiki.gentoo.org/wiki/UTF-8#Setting_up_UTF-8_in_Gentoo or https://wiki.gentoo.org/wiki/Localization/Guide#Generating_specific_locales?
Back to top
View user's profile Send private message
t0ha
n00b
n00b


Joined: 04 Sep 2018
Posts: 10

PostPosted: Thu Jun 11, 2020 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 463
Location: South America

PostPosted: Thu Jun 11, 2020 8:54 pm    Post subject: Reply with quote

/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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3487

PostPosted: Fri Jun 12, 2020 5:17 am    Post subject: Reply with quote

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
View user's profile Send private message
LuxJux
Guru
Guru


Joined: 01 Mar 2016
Posts: 419

PostPosted: Fri Jun 12, 2020 5:26 pm    Post subject: Reply with quote

Manually updating system-files always need deep knowledge.
_________________
Now, you can breath. After emerge always reboot
Back to top
View user's profile Send private message
t0ha
n00b
n00b


Joined: 04 Sep 2018
Posts: 10

PostPosted: Fri Jun 12, 2020 9:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2353
Location: Frankfurt, Germany

PostPosted: Fri Jun 12, 2020 11:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15840

PostPosted: Sat Jun 13, 2020 1:06 am    Post subject: Reply with quote

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
View user's profile Send private message
LuxJux
Guru
Guru


Joined: 01 Mar 2016
Posts: 419

PostPosted: Sat Jun 13, 2020 2:19 am    Post subject: Reply with quote

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:
Code:

C.UTF8 UTF-8


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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3487

PostPosted: Sat Jun 13, 2020 5:56 am    Post subject: Reply with quote

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
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 463
Location: South America

PostPosted: Sat Jun 13, 2020 8:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3487

PostPosted: Sat Jun 13, 2020 10:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 463
Location: South America

PostPosted: Sat Jun 13, 2020 10:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum