public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Guénaël MULLER" <guenael.muller@smile.fr>,
	"Quentin Schulz" <quentin.schulz@cherry.de>
Cc: <docs@lists.yoctoproject.org>, "Yoann Congal" <yoann.congal@smile.fr>
Subject: Re: [docs] [PATCH v2] ref-manual: use standardized method accross both ubuntu and debian for locale install
Date: Wed, 27 Nov 2024 09:34:39 +0100	[thread overview]
Message-ID: <D5WTN1Y5MZCZ.RY7J5FM4O3FO@bootlin.com> (raw)
In-Reply-To: <CAEbF956MhH+YVmng85XageBFwb9yA8w4KOo_2K7Kcawy1j5Qnw@mail.gmail.com>

Hi Guénaël,

On Mon Nov 25, 2024 at 3:39 PM CET, Guénaël MULLER wrote:
[...]
>> I assume this works correctly if one uses an interactive container. E.g.
>> I'm expecting this won't work with these instructions in a
>> Containerfile/Dockerfile for example.
>>
>> podman run --userns=keep-id --user root debian:bookworm sh -c 'apt-get
>> update && apt-get install -y locales; locale --all-locales | grep
>> en_US.utf8; dpkg-reconfigure locales; locale --all-locales | grep
>> en_US.utf8;'
>>
>> it'll fail when running dpkg-reconfigure. If you add --frontend
>> noninteractive, then it just does nothing.
>>
>> I'm not sure if we really need noninteractive instructions, but I would
>> at least mention that we know it doesn't work for noninteractive
>> terminals in a note below the instructions? I understand we may not want
>> to instruct users to modify their locales with a simple sed command
>> which is apparently the appropriate way?
>>
>
> I see 2 solutions to solve this issue there:
>
>    - just add "(interactive mode only)"  to the line before the command
>    line.
>    - add a complete note that explain all the stuff, something like:

I'd go with this approach (explain it all).

>
>  - If your are not using the interactive mode, ``dpkg-reconfigure`` will
> not work as expected. To add the locale
> you will need to edit ``/etc/locale.gen`` file. A naive way to do this as
> root is::
>
> $ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
> $ locale-gen

Yes, I would add this after the dpkg-reconfigure method (although maybe I
wouldn't echo into /etc/locale.gen, but rather instruct that "en_US.UTF-8" must
be present and uncommented in this file).

Also, before that, I would simply mention that the dpkg-reconfigure method is
interactive (followed by the /etc/locale.gen method above).


Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2024-11-27  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 10:45 [PATCH v2] ref-manual: use standardized method accross both ubuntu and debian for locale install Guénaël Muller
2024-11-18 11:00 ` Antonin Godard
2024-11-19  9:28   ` [docs] " Quentin Schulz
2024-11-20 16:43     ` Antonin Godard
2024-11-22  9:25       ` Guénaël MULLER
2024-11-25  8:07         ` Antonin Godard
2024-11-25 10:19         ` Quentin Schulz
2024-11-25 14:39           ` Guénaël MULLER
2024-11-27  8:34             ` Antonin Godard [this message]

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=D5WTN1Y5MZCZ.RY7J5FM4O3FO@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=guenael.muller@smile.fr \
    --cc=quentin.schulz@cherry.de \
    --cc=yoann.congal@smile.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox