Re: [docs] [PATCH v2] ref-manual: use standardized method accross both ubuntu and debian for locale install

Antonin Godard
2024-11-20T16:43:16Z

Hi Guénaël, Quentin,

On Tue Nov 19, 2024 at 10:28 AM CET, Quentin Schulz via lists.yoctoproject.org wrote:
[...]
>>> +You also need to ensure you have the locale ``en_US.UTF-8`` enabled::
>>> +
>
> I believe "the ``en_US.UTF-8`` locale" is more proper here.
>
> On a side note, what's the actual cost of reconfiguring the locales
> regardless of the presence of en_US.UTF-8?
>
> My point being we could probably have this command in poky.yaml.in like
> it used to be?
>
>>> + $ locale --all-locales | grep en_US.utf8
>>> +
>>> +If this is not the case, you can reconfigure the ``locales`` package to add it::
>>> +
>>> + $ sudo dpkg-reconfigure locales
>>> +
>
> How does this actually generate en_US.utf8 locale if we don't explicitly
> add it somewhere? Are you sure it's not because your system has LANG or
> LC_ALL set to that locale and then calling reconfigure it regenerate it?
>
> Also on a side note we tell people to check if "en_US.UTF-8" locale is
> enabled by grepping for "en_US.utf8", is that expected? Why aren't they
> the same?

Yes, "locale --all-locales" does return "en_US.utf8" while we install the
"en_US.UTF-8" locale (different string, not sure why).

I seem to be able to build with both Debian/Ubuntu with this command:

LANG="en_US.UTF-8" locale-gen

Maybe this is a more straightforward approach, closer to what we had before.
What do you think? Guénaël would you be able to update your patch with this
command if this works for you too?

Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering