public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixup Perl warnings about locale
@ 2018-04-26 13:40 claudius.heine.ext
  2018-04-26 13:40 ` [PATCH 1/2] classes/isar-bootstrap-helper: set locale variables claudius.heine.ext
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: claudius.heine.ext @ 2018-04-26 13:40 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

From: Claudius Heine <ch@denx.de>

Hi,

this patchset sets the locale variables to avoid locale warnings of
Perl.

regards,
Claudius

Claudius Heine (2):
  classes/isar-bootstrap-helper: set locale variables
  buildchroot/build.sh: set locale variables

 meta/classes/isar-bootstrap-helper.bbclass       | 4 ++++
 meta/recipes-devtools/buildchroot/files/build.sh | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

-- 
2.17.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] classes/isar-bootstrap-helper: set locale variables
  2018-04-26 13:40 [PATCH 0/2] Fixup Perl warnings about locale claudius.heine.ext
@ 2018-04-26 13:40 ` claudius.heine.ext
  2018-04-26 13:40 ` [PATCH 2/2] buildchroot/build.sh: " claudius.heine.ext
  2018-04-26 16:55 ` [PATCH 0/2] Fixup Perl warnings about locale Alexander Smirnov
  2 siblings, 0 replies; 7+ messages in thread
From: claudius.heine.ext @ 2018-04-26 13:40 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

From: Claudius Heine <ch@denx.de>

Some Perl warnings happend while installing packages via apt on the
rootfs. Setting the base locale variables should fix those.

Signed-off-by: Claudius Heine <ch@denx.de>
---
 meta/classes/isar-bootstrap-helper.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index e062921..4284d02 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -32,6 +32,10 @@ setup_root_file_system() {
     # Install packages:
     E="${@ bb.utils.export_proxies(d)}"
     export DEBIAN_FRONTEND=noninteractive
+    # To avoid Perl locale warnings:
+    export LANG=C
+    export LANGUAGE=C
+    export LC_ALL=C
     sudo -E chroot "$ROOTFSDIR" /usr/bin/apt-get update \
         -o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \
         -o Dir::Etc::sourceparts="-" \
-- 
2.17.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] buildchroot/build.sh: set locale variables
  2018-04-26 13:40 [PATCH 0/2] Fixup Perl warnings about locale claudius.heine.ext
  2018-04-26 13:40 ` [PATCH 1/2] classes/isar-bootstrap-helper: set locale variables claudius.heine.ext
@ 2018-04-26 13:40 ` claudius.heine.ext
  2018-04-26 16:55 ` [PATCH 0/2] Fixup Perl warnings about locale Alexander Smirnov
  2 siblings, 0 replies; 7+ messages in thread
From: claudius.heine.ext @ 2018-04-26 13:40 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

From: Claudius Heine <ch@denx.de>

Some Perl warnings occured while building packages. Adding the some
basic locale environment variables to the build script fixes those.

Signed-off-by: Claudius Heine <ch@denx.de>
---
 meta/recipes-devtools/buildchroot/files/build.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index 06172f7..aa769e4 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -9,6 +9,11 @@ set -e
 # Go to build directory
 cd $1
 
+# To avoid Perl locale warnings:
+export LC_ALL=C
+export LANG=C
+export LANGUAGE=C
+
 # Install command to be used by mk-build-deps
 # Notes:
 #   1) everything before the -y switch is unchanged from the defaults
@@ -46,4 +51,4 @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do
 done
 
 # Build the package
-LC_ALL=C LANG=C dpkg-buildpackage
+dpkg-buildpackage
-- 
2.17.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Fixup Perl warnings about locale
  2018-04-26 13:40 [PATCH 0/2] Fixup Perl warnings about locale claudius.heine.ext
  2018-04-26 13:40 ` [PATCH 1/2] classes/isar-bootstrap-helper: set locale variables claudius.heine.ext
  2018-04-26 13:40 ` [PATCH 2/2] buildchroot/build.sh: " claudius.heine.ext
@ 2018-04-26 16:55 ` Alexander Smirnov
  2018-04-26 17:27   ` Claudius Heine
  2 siblings, 1 reply; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-26 16:55 UTC (permalink / raw)
  To: claudius.heine.ext, isar-users; +Cc: Claudius Heine

Hi,

thank you for the quick reaction.

On 04/26/2018 04:40 PM, claudius.heine.ext@siemens.com wrote:
> From: Claudius Heine <ch@denx.de>
> 
> Hi,
> 
> this patchset sets the locale variables to avoid locale warnings of
> Perl.

After this series almost all (except wheezy) example-hello's build log 
starts with the line:

DEBUG: Executing shell function do_build
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

It would be nice to investigate the source of this warning and fix it 
before applying.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Fixup Perl warnings about locale
  2018-04-26 16:55 ` [PATCH 0/2] Fixup Perl warnings about locale Alexander Smirnov
@ 2018-04-26 17:27   ` Claudius Heine
  2018-04-26 18:15     ` Alexander Smirnov
  0 siblings, 1 reply; 7+ messages in thread
From: Claudius Heine @ 2018-04-26 17:27 UTC (permalink / raw)
  To: Alexander Smirnov, claudius.heine.ext, isar-users

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

Hi Alex,

On Thu, 2018-04-26 at 19:55 +0300, Alexander Smirnov wrote:
> Hi,
> 
> thank you for the quick reaction.
> 
> On 04/26/2018 04:40 PM, claudius.heine.ext@siemens.com wrote:
> > From: Claudius Heine <ch@denx.de>
> > 
> > Hi,
> > 
> > this patchset sets the locale variables to avoid locale warnings of
> > Perl.
> 
> After this series almost all (except wheezy) example-hello's build
> log 
> starts with the line:
> 
> DEBUG: Executing shell function do_build
> /bin/bash: warning: setlocale: LC_ALL: cannot change locale
> (en_US.UTF-8)
> 
> It would be nice to investigate the source of this warning and fix
> it 
> before applying.

I think that message happens before this series as well. I might be
wrong but I think the problem there is in bitbake, because it sets this
variable to 'en_US.UTF-8' per default. I haven't investigated it, but
to fix this we might need to patch bitbake for this.

Cheers,
Claudius

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

            PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153
                              Keyserver: hkp://pool.sks-keyservers.net

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Fixup Perl warnings about locale
  2018-04-26 17:27   ` Claudius Heine
@ 2018-04-26 18:15     ` Alexander Smirnov
  2018-05-15 12:21       ` Alexander Smirnov
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-26 18:15 UTC (permalink / raw)
  To: Claudius Heine, claudius.heine.ext, isar-users

Hi,

On 04/26/2018 08:27 PM, Claudius Heine wrote:
> Hi Alex,
> 
> On Thu, 2018-04-26 at 19:55 +0300, Alexander Smirnov wrote:
>> Hi,
>>
>> thank you for the quick reaction.
>>
>> On 04/26/2018 04:40 PM, claudius.heine.ext@siemens.com wrote:
>>> From: Claudius Heine <ch@denx.de>
>>>
>>> Hi,
>>>
>>> this patchset sets the locale variables to avoid locale warnings of
>>> Perl.
>>
>> After this series almost all (except wheezy) example-hello's build
>> log
>> starts with the line:
>>
>> DEBUG: Executing shell function do_build
>> /bin/bash: warning: setlocale: LC_ALL: cannot change locale
>> (en_US.UTF-8)
>>
>> It would be nice to investigate the source of this warning and fix
>> it
>> before applying.
> 
> I think that message happens before this series as well. I might be
> wrong but I think the problem there is in bitbake, because it sets this
> variable to 'en_US.UTF-8' per default. I haven't investigated it, but
> to fix this we might need to patch bitbake for this.

To be honest, I didn't get it... Does it mean you are going to 
investigate the issue, or you'd like somebody else to do this?

I've performed quick test - build master branch, it's still based on 
multistrap. Build log doesn't contain warning message:

DEBUG: Executing shell function do_build
Ign file: isar InRelease
Ign file: isar Release.gpg
Get:1 file: isar Release [3,566 B]
Ign file: isar/main Translation-en_US

So seems this is an issue in Isar.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Fixup Perl warnings about locale
  2018-04-26 18:15     ` Alexander Smirnov
@ 2018-05-15 12:21       ` Alexander Smirnov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-05-15 12:21 UTC (permalink / raw)
  To: Claudius Heine, claudius.heine.ext, isar-users

On 04/26/2018 09:15 PM, Alexander Smirnov wrote:
> Hi,
> 
> On 04/26/2018 08:27 PM, Claudius Heine wrote:
>> Hi Alex,
>>
>> On Thu, 2018-04-26 at 19:55 +0300, Alexander Smirnov wrote:
>>> Hi,
>>>
>>> thank you for the quick reaction.
>>>
>>> On 04/26/2018 04:40 PM, claudius.heine.ext@siemens.com wrote:
>>>> From: Claudius Heine <ch@denx.de>
>>>>
>>>> Hi,
>>>>
>>>> this patchset sets the locale variables to avoid locale warnings of
>>>> Perl.
>>>
>>> After this series almost all (except wheezy) example-hello's build
>>> log
>>> starts with the line:
>>>
>>> DEBUG: Executing shell function do_build
>>> /bin/bash: warning: setlocale: LC_ALL: cannot change locale
>>> (en_US.UTF-8)
>>>
>>> It would be nice to investigate the source of this warning and fix
>>> it
>>> before applying.
>>
>> I think that message happens before this series as well. I might be
>> wrong but I think the problem there is in bitbake, because it sets this
>> variable to 'en_US.UTF-8' per default. I haven't investigated it, but
>> to fix this we might need to patch bitbake for this.
> 
> To be honest, I didn't get it... Does it mean you are going to 
> investigate the issue, or you'd like somebody else to do this?
> 
> I've performed quick test - build master branch, it's still based on 
> multistrap. Build log doesn't contain warning message:
> 
> DEBUG: Executing shell function do_build
> Ign file: isar InRelease
> Ign file: isar Release.gpg
> Get:1 file: isar Release [3,566 B]
> Ign file: isar/main Translation-en_US
> 
> So seems this is an issue in Isar.
> 

Applied to next, thanks!

I've found the source of this warning message - there is no UTF-8 locale 
generated in rootfs. So seems it's yet another difference between 
multistrap and debootstrap. I'll fix this in a separate patch.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-15 12:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 13:40 [PATCH 0/2] Fixup Perl warnings about locale claudius.heine.ext
2018-04-26 13:40 ` [PATCH 1/2] classes/isar-bootstrap-helper: set locale variables claudius.heine.ext
2018-04-26 13:40 ` [PATCH 2/2] buildchroot/build.sh: " claudius.heine.ext
2018-04-26 16:55 ` [PATCH 0/2] Fixup Perl warnings about locale Alexander Smirnov
2018-04-26 17:27   ` Claudius Heine
2018-04-26 18:15     ` Alexander Smirnov
2018-05-15 12:21       ` Alexander Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox