public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Christian Storm <christian.storm@siemens.com>
To: isar-users@googlegroups.com
Subject: Re: [PATCH] build.sh: Fix perl complaints about locale
Date: Fri, 17 Nov 2017 11:12:47 +0100	[thread overview]
Message-ID: <20171117101247.dnpqredxybd6oqjx@MD1KR9XC.ww002.siemens.net> (raw)
In-Reply-To: <5e5c4544-67ae-7870-10ca-bd91457efd96@ilbers.de>


> >>>>> [...]
> >>>>>
> >>>>> Not sure what "ignorenativearch" does, but "sed /etc/locale.gen &&
> >>>>> locale-gen" is clearer and probably free of side-effects. Are we
> >>>>> sure about all implications of ignorenativearch?
> >>>>
> >>>> To be honest, I don't exactly know what multistrap does in native
> >>>> mode (to be investigated), but with "ignorenativearch=true" we can
> >>>> guarantee that Isar has the same build flow for *all* the
> >>>> architectures. Otherwise we will have 2 possible flows: for native
> >>>> arch and for foreign archs, what could be the source of potential
> >>>> bugs like we have now with locales.
> >>>
> >>> True, but without that knowledge and looking at the one issue, i would
> >>> prefer that patch that i understand ;).
> >>>
> >>
> >> Yeah, but on the other hand:
> >>    - There is dedicated code which should setup locales, seems it's
> >>    broken in master for native builds now.
> >>    - Instead of fixing it, yet another locale setup is proposed.
> > 
> > Well, strictly speaking, it's not yet another locale setup. If you do
> > the `sed` and `dpkg-reconfigure locale` it's merely an explicit setup,
> > more of the same so to say. The `dpkg --configure -a` at the bottom of
> > configscript.sh may not *re-*configure a (wrongly) configured locale
> > package.
> 
> Sorry, don't understand why locales could be miss-configured and 
> reconfigure is needed:
> 
> 1. Here we define the default locale:
> https://github.com/ilbers/isar/blob/next/meta/recipes-devtools/buildchroot/files/configscript.sh#L8
> 
> 2. Here is the first dpkg --configure is called:
> https://github.com/ilbers/isar/blob/next/meta/recipes-devtools/buildchroot/files/configscript.sh#L46
> 
> In your case for native arch, there is a bug in Isar, that postinst 
> scripts are run by multistrap before 'configscript.sh'.

Ah, that would explain why an explicit *re*-configuration in
configscript.sh helps in this case... Thanks for digging deeper!


> [...]
> 
> After thinking about this problem I have the following summary:
> 
> 1. 'ignorenativearch=true' should be used. It prevents multistrap from 
> early postinst scripts execution. That is needed to guarantee that all 
> the architectures are handled in the same way.
> 
> EFFECT: with this change we have correctly generated locales for en.UTF-8.

Agreed.


> 2. The initial patch from Christian is needed. AFAIK, chroot by default 
> inherits environment from host system (including LC_* variables). So if 
> user has different locale set on the host (for example de.*), then 
> annoying locale flood in buildchroot will appear again, because in 
> buildchroot only en.UTF-8 is generated.
> 
> EFFECT: this patch will guarantee, that en.UTF-8 will be used in 
> buildchroot despite on host settings.

Yes. However, I do not have double-checked whether this is the only
point where this has to be inserted...


> 3. We should consider the possibility to change locale in buildchroot 
> for users who don't speak English good enough to understand 
> compiler/other tools output. So I propose to define some variable in, 
> for example, local.conf, which will define the default locale for 
> buildchroot and target image:
> 
> DEFAULT_LOCALE ?= "en.UTF-8"
> 
> and then 'sed' configscripts.sh script accordingly.

Hm, I'm indecisive whether this is a good idea or not. English is the
lingua franca and hence makes it easy to Google for errors if you don't
understand the error message, potentially yielding more results than
localized Googling. That said, I'm not against the idea, it would just
have a close to none priority for me :)


Kind regards,
   Christian

-- 
Dr. Christian Storm
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Otto-Hahn-Ring 6, 81739 M�nchen, Germany

  reply	other threads:[~2017-11-17 10:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 12:21 Christian Storm
2017-11-13 12:49 ` Alexander Smirnov
2017-11-13 13:19   ` Christian Storm
2017-11-13 13:44     ` Alexander Smirnov
2017-11-13 14:07       ` Alexander Smirnov
2017-11-13 14:16         ` Christian Storm
2017-11-13 14:35           ` Alexander Smirnov
2017-11-13 15:24             ` Christian Storm
2017-11-13 16:10               ` Henning Schild
2017-11-13 16:50                 ` Alexander Smirnov
2017-11-13 17:06                   ` Henning Schild
2017-11-13 17:19                     ` Alexander Smirnov
2017-11-14  8:41                       ` Christian Storm
2017-11-16 13:17                         ` Alexander Smirnov
2017-11-17 10:12                           ` Christian Storm [this message]
2017-11-17 10:42 ` Alexander Smirnov
2017-11-21  8:42   ` Henning Schild
2017-11-21  8:56     ` Alexander Smirnov
2017-11-21 18:04       ` Henning Schild
2017-11-21 18:12         ` Alexander Smirnov
2017-11-21 18:32           ` Henning Schild
2017-11-21 18:40             ` Alexander Smirnov
2017-11-26 22:09               ` Alexander Smirnov

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=20171117101247.dnpqredxybd6oqjx@MD1KR9XC.ww002.siemens.net \
    --to=christian.storm@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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