All of lore.kernel.org
 help / color / mirror / Atom feed
* Failing devshell
@ 2015-11-26 17:25 Dariusz Pelowski
  2015-11-26 17:46 ` Leonardo Sandoval
  2015-11-27 12:45 ` Burton, Ross
  0 siblings, 2 replies; 8+ messages in thread
From: Dariusz Pelowski @ 2015-11-26 17:25 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1756 bytes --]

Hi,

I'm getting an error during execution of devshell:
bitbake -c devshell  quilt-native
WARNING: Host distribution "Arch-Linux" has not been validated with this
version of the build system; you may possibly experience unexpected
failures. It is recommended that you use a tested distribution.
...
ERROR: Unable to spawn terminal auto: Execution of
'/home/darekp/locale_test/tmp/work/x86_64-linux/quilt-native/0.64-r0/temp/run.do_terminal.18591'
failed with exit code 1:
Opcja „-t” nie jest już obsługiwana w tej wersji programu gnome-terminal.
Przetworzenie parametrów się nie powiodło: Opcja „--disable-factory” nie
jest już obsługiwana w tej wersji programu gnome-terminal.
ERROR: Function failed: do_devshell
ERROR: Logfile of failure stored in:
/home/darekp/locale_test/tmp/work/x86_64-linux/quilt-native/0.64-r0/temp/log.do_devshell.18591
ERROR: Task 3 (/home/darekp/poky/meta/recipes-devtools/quilt/
quilt-native_0.64.bb, do_devshell) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4 tasks of which 3 didn't need to be rerun
and 1 failed.


The cause of the problem is the implementation of
poky/meta/lib/oe/terminal.py. It expects that gnome-terminal --version will
return string starting from: "GNOME Terminal". But the returned string
differs when locale is changes. This looks like this:

[darekp@darekp ~]$ LANG=C gnome-terminal --version
GNOME Terminal 3.18.2

[darekp@darekp ~]$ LANG=pl_PL.utf8 gnome-terminal --version
Terminal GNOME 3.18.2

The same problem affects other locales in gnome-terminal. I'm proposing to
fix this issue by setting LANG=C during execution of gnome-terminal
--version.

Is it acceptable solution? Could you apply attached patch?

Thanks,
Dariusz

[-- Attachment #1.2: Type: text/html, Size: 2021 bytes --]

[-- Attachment #2: 0001-fix-for-locale-dependend-version-string-returned-by-.patch --]
[-- Type: text/x-diff, Size: 1058 bytes --]

From e49c5fc72ae69f6a43231f42bc5494b84b1c85bb Mon Sep 17 00:00:00 2001
From: Dariusz Pelowski <dariusz.pelowski@gmail.com>
Date: Thu, 26 Nov 2015 17:59:53 +0100
Subject: [PATCH] fix for locale dependend version string returned by
 gnome-terminal

---
 meta/lib/oe/terminal.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index a4a8c97..1efc06d 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -244,7 +244,9 @@ def check_terminal_version(terminalName):
         cmdversion = '%s --version' % terminalName
         if terminalName.startswith('tmux'):
             cmdversion = '%s -V' % terminalName
-        p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE,stderr=sub.PIPE)
+        newenv = os.environ.copy()
+        newenv["LANG"] = "C"
+        p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
         out, err = p.communicate()
         ver_info = out.rstrip().split('\n')
     except OSError as exc:
-- 
2.6.2


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

* Re: Failing devshell
  2015-11-26 17:25 Failing devshell Dariusz Pelowski
@ 2015-11-26 17:46 ` Leonardo Sandoval
  2015-11-26 19:10   ` Dariusz Pelowski
  2015-11-27 12:45 ` Burton, Ross
  1 sibling, 1 reply; 8+ messages in thread
From: Leonardo Sandoval @ 2015-11-26 17:46 UTC (permalink / raw)
  To: Dariusz Pelowski, yocto

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


>
> Is it acceptable solution? Could you apply attached patch?
>

A less intrusive change would be to check if the output of the --version 
command contains the word 'GNOME' (either using the 'in' build-in 
operation or string.find). This is done in the same function you 
modified in your previous patch.

> Thanks,
> Dariusz
>
>
>


[-- Attachment #2: Type: text/html, Size: 1112 bytes --]

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

* Re: Failing devshell
  2015-11-26 17:46 ` Leonardo Sandoval
@ 2015-11-26 19:10   ` Dariusz Pelowski
  2015-11-26 19:33     ` Leonardo Sandoval
  0 siblings, 1 reply; 8+ messages in thread
From: Dariusz Pelowski @ 2015-11-26 19:10 UTC (permalink / raw)
  To: Leonardo Sandoval, yocto


> A less intrusive change would be to check if the output of the 
> --version command contains the word 'GNOME' (either using the 'in' 
> build-in operation or string.find). This is done in the same function 
> you modified in your previous patch.
>
>

Greping gnome-terminal translations we can find that word "GNOME" 
doesn't exists in all languages:
am.po:msgid "GNOME Terminal"
am.po-msgstr "የኖም ተርሚናል"
--
ar.po:msgid "GNOME Terminal"
ar.po-msgstr "طرفيّة جنوم"
--
dz.po:msgid "GNOME Terminal"
dz.po-msgstr "ཇི་ནོམ་ ཊར་མི་ནཱལ་།"
--
en@shaw.po:msgid "GNOME Terminal"
en@shaw.po-msgstr "·𐑜𐑯𐑴𐑥 𐑑𐑻𐑥𐑦𐑯𐑩𐑤"
--
fa.po:msgid "GNOME Terminal"
fa.po-msgstr "پایانه‌ی گنوم"
--
fi.po:msgid "GNOME Terminal"
fi.po-msgstr "Gnomen pääte"
--
hi.po:msgid "GNOME Terminal"
hi.po-msgstr "गनोम टर्मिनल"
--
hy.po:msgid "GNOME Terminal"
hy.po-msgstr "ԳՆՈՄ Տերմինալ"
--
ka.po:msgid "GNOME Terminal"
ka.po-msgstr "გნომ ტერმინალი"
--
ko.po:msgid "GNOME Terminal"
ko.po-msgstr "그놈 터미널"
--
mai.po:msgid "GNOME Terminal"
mai.po-msgstr "गनोम टर्मिनल"
--
ml.po:msgid "GNOME Terminal"
ml.po-msgstr "ഗ്നോം ടെര്‍മിനല്‍"
--
mn.po:msgid "GNOME Terminal"
mn.po-msgstr "ГНОМЕ-Терминал"
--
ne.po:msgid "GNOME Terminal"
ne.po-msgstr "जिनोम टर्मिनल"
--
ps.po:msgid "GNOME Terminal"
ps.po-msgstr "جنومي پايالی"
--
rw.po:msgid "GNOME Terminal"
rw.po-msgstr ""
--
si.po:msgid "GNOME Terminal"
si.po-msgstr "ග්නෝම් අග්‍රය"
--
sr.po:msgid "GNOME Terminal"
sr.po-msgstr "Гномов терминал"
--
sr@latin.po:msgid "GNOME Terminal"
sr@latin.po-msgstr "Gnomov terminal"
--
ta.po:msgid "GNOME Terminal"
ta.po-msgstr "கனோம் முனையம்"
--
te.po:msgid "GNOME Terminal"
te.po-msgstr "గ్నోమ్ టెర్మినల్"
--
ug.po:msgid "GNOME Terminal"
ug.po-msgstr "گىنوم تېرمىنال"

Can we stay with setting default locale?

Thanks,
Dariusz



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

* Re: Failing devshell
  2015-11-26 19:10   ` Dariusz Pelowski
@ 2015-11-26 19:33     ` Leonardo Sandoval
  2015-11-26 20:01       ` Dariusz Pelowski
  0 siblings, 1 reply; 8+ messages in thread
From: Leonardo Sandoval @ 2015-11-26 19:33 UTC (permalink / raw)
  To: Dariusz Pelowski, yocto

You are right. have you done some testing in non-gnome terminals using 
your patch?

On 11/26/2015 01:10 PM, Dariusz Pelowski wrote:
>
>> A less intrusive change would be to check if the output of the 
>> --version command contains the word 'GNOME' (either using the 'in' 
>> build-in operation or string.find). This is done in the same function 
>> you modified in your previous patch.
>>
>>
>
> Greping gnome-terminal translations we can find that word "GNOME" 
> doesn't exists in all languages:
> am.po:msgid "GNOME Terminal"
> am.po-msgstr "የኖም ተርሚናል"
> -- 
> ar.po:msgid "GNOME Terminal"
> ar.po-msgstr "طرفيّة جنوم"
> -- 
> dz.po:msgid "GNOME Terminal"
> dz.po-msgstr "ཇི་ནོམ་ ཊར་མི་ནཱལ་།"
> -- 
> en@shaw.po:msgid "GNOME Terminal"
> en@shaw.po-msgstr "·𐑜𐑯𐑴𐑥 𐑑𐑻𐑥𐑦𐑯𐑩𐑤"
> -- 
> fa.po:msgid "GNOME Terminal"
> fa.po-msgstr "پایانه‌ی گنوم"
> -- 
> fi.po:msgid "GNOME Terminal"
> fi.po-msgstr "Gnomen pääte"
> -- 
> hi.po:msgid "GNOME Terminal"
> hi.po-msgstr "गनोम टर्मिनल"
> -- 
> hy.po:msgid "GNOME Terminal"
> hy.po-msgstr "ԳՆՈՄ Տերմինալ"
> -- 
> ka.po:msgid "GNOME Terminal"
> ka.po-msgstr "გნომ ტერმინალი"
> -- 
> ko.po:msgid "GNOME Terminal"
> ko.po-msgstr "그놈 터미널"
> -- 
> mai.po:msgid "GNOME Terminal"
> mai.po-msgstr "गनोम टर्मिनल"
> -- 
> ml.po:msgid "GNOME Terminal"
> ml.po-msgstr "ഗ്നോം ടെര്‍മിനല്‍"
> -- 
> mn.po:msgid "GNOME Terminal"
> mn.po-msgstr "ГНОМЕ-Терминал"
> -- 
> ne.po:msgid "GNOME Terminal"
> ne.po-msgstr "जिनोम टर्मिनल"
> -- 
> ps.po:msgid "GNOME Terminal"
> ps.po-msgstr "جنومي پايالی"
> -- 
> rw.po:msgid "GNOME Terminal"
> rw.po-msgstr ""
> -- 
> si.po:msgid "GNOME Terminal"
> si.po-msgstr "ග්නෝම් අග්‍රය"
> -- 
> sr.po:msgid "GNOME Terminal"
> sr.po-msgstr "Гномов терминал"
> -- 
> sr@latin.po:msgid "GNOME Terminal"
> sr@latin.po-msgstr "Gnomov terminal"
> -- 
> ta.po:msgid "GNOME Terminal"
> ta.po-msgstr "கனோம் முனையம்"
> -- 
> te.po:msgid "GNOME Terminal"
> te.po-msgstr "గ్నోమ్ టెర్మినల్"
> -- 
> ug.po:msgid "GNOME Terminal"
> ug.po-msgstr "گىنوم تېرمىنال"
>
> Can we stay with setting default locale?
>
> Thanks,
> Dariusz
>



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

* Re: Failing devshell
  2015-11-26 19:33     ` Leonardo Sandoval
@ 2015-11-26 20:01       ` Dariusz Pelowski
  0 siblings, 0 replies; 8+ messages in thread
From: Dariusz Pelowski @ 2015-11-26 20:01 UTC (permalink / raw)
  To: Leonardo Sandoval, yocto

> You are right. have you done some testing in non-gnome terminals using 
> your patch?
>

Yes, all terminals using check_terminal_version() function works 
correctly on my system (Konsole: 15.08.0; tmux 2.1)



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

* Re: Failing devshell
  2015-11-26 17:25 Failing devshell Dariusz Pelowski
  2015-11-26 17:46 ` Leonardo Sandoval
@ 2015-11-27 12:45 ` Burton, Ross
  2015-11-27 13:00   ` Dariusz Pelowski
  1 sibling, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-11-27 12:45 UTC (permalink / raw)
  To: Dariusz Pelowski; +Cc: yocto@yoctoproject.org

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

On 26 November 2015 at 17:25, Dariusz Pelowski <dariusz.pelowski@gmail.com>
wrote:

> Is it acceptable solution? Could you apply attached patch?
>

That's exactly the right thing to do.  Can you reformat the commit message
to match git style ("lib/oe/terminal: use C locale when determining
version" as the first line, the important bit being the submodule at the
beginning) and re-send the patch to the
openembedded-core@lists.openembedded.org mailing list?

Thanks,
Ross

[-- Attachment #2: Type: text/html, Size: 955 bytes --]

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

* Re: Failing devshell
  2015-11-27 12:45 ` Burton, Ross
@ 2015-11-27 13:00   ` Dariusz Pelowski
  0 siblings, 0 replies; 8+ messages in thread
From: Dariusz Pelowski @ 2015-11-27 13:00 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto@yoctoproject.org

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

2015-11-27 13:45 GMT+01:00 Burton, Ross <ross.burton@intel.com>:

>
> On 26 November 2015 at 17:25, Dariusz Pelowski <dariusz.pelowski@gmail.com
> > wrote:
>
>> Is it acceptable solution? Could you apply attached patch?
>>
>
> That's exactly the right thing to do.  Can you reformat the commit message
> to match git style ("lib/oe/terminal: use C locale when determining
> version" as the first line, the important bit being the submodule at the
> beginning) and re-send the patch to the
> openembedded-core@lists.openembedded.org mailing list?
>
> Thanks,
> Ross
>

Sure,

Thanks,
Dariusz

[-- Attachment #2: Type: text/html, Size: 1577 bytes --]

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

* Failing devshell
@ 2015-11-27 13:49 Dariusz Pelowski
  0 siblings, 0 replies; 8+ messages in thread
From: Dariusz Pelowski @ 2015-11-27 13:49 UTC (permalink / raw)
  To: openembedded-core

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

2015-11-26 18:25 GMT+01:00 Dariusz Pelowski <dariusz.pelowski@gmail.com>:
> I'm getting an error during execution of devshell:
> bitbake -c devshell  quilt-native
> WARNING: Host distribution "Arch-Linux" has not been validated with this
> version of the build system; you may possibly experience unexpected
> failures. It is recommended that you use a tested distribution.
> ...
> ERROR: Unable to spawn terminal auto: Execution of
> '/home/darekp/locale_test/tmp/work/x86_64-linux/quilt-native/0.64-r0/temp/run.do_terminal.18591'
> failed with exit code 1:
> Opcja „-t” nie jest już obsługiwana w tej wersji programu gnome-terminal.
> Przetworzenie parametrów się nie powiodło: Opcja „--disable-factory” nie
> jest już obsługiwana w tej wersji programu gnome-terminal.
> ERROR: Function failed: do_devshell
> ERROR: Logfile of failure stored in:
> /home/darekp/locale_test/tmp/work/x86_64-linux/quilt-native/0.64-r0/temp/log.do_devshell.18591
> ERROR: Task 3
> (/home/darekp/poky/meta/recipes-devtools/quilt/quilt-native_0.64.bb,
> do_devshell) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 4 tasks of which 3 didn't need to be rerun
> and 1 failed.
>
>
> The cause of the problem is the implementation of
> poky/meta/lib/oe/terminal.py. It expects that gnome-terminal --version will
> return string starting from: "GNOME Terminal". But the returned string
> differs when locale is changes. This looks like this:
>
> [darekp@darekp ~]$ LANG=C gnome-terminal --version
> GNOME Terminal 3.18.2
>
> [darekp@darekp ~]$ LANG=pl_PL.utf8 gnome-terminal --version
> Terminal GNOME 3.18.2
>
> The same problem affects other locales in gnome-terminal. I'm proposing to
> fix this issue by setting LANG=C during execution of gnome-terminal
> --version.
>

Hi,

Described problem was discussed on yocto@yoctoproject.org mailing
list. Attached patch is fixing this issue, could you apply it? (I've
tested this change on all terminals calling changed function: GNOME
Terminal 3.18.2, Konsole: 15.08.0, tmux 2.1 and it worked correctly)

Thanks,
Dariusz

[-- Attachment #2: 0001-lib-oe-terminal-use-C-locale-when-determining-versio.patch --]
[-- Type: text/x-patch, Size: 1045 bytes --]

From 8b1ffc76ea5a4b0862f4ba7c073d80aa2b5bd600 Mon Sep 17 00:00:00 2001
From: Dariusz Pelowski <dariusz.pelowski@gmail.com>
Date: Thu, 26 Nov 2015 17:59:53 +0100
Subject: [PATCH] lib/oe/terminal: use C locale when determining version

---
 meta/lib/oe/terminal.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index a4a8c97..1efc06d 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -244,7 +244,9 @@ def check_terminal_version(terminalName):
         cmdversion = '%s --version' % terminalName
         if terminalName.startswith('tmux'):
             cmdversion = '%s -V' % terminalName
-        p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE,stderr=sub.PIPE)
+        newenv = os.environ.copy()
+        newenv["LANG"] = "C"
+        p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
         out, err = p.communicate()
         ver_info = out.rstrip().split('\n')
     except OSError as exc:
-- 
2.6.2


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

end of thread, other threads:[~2015-11-27 13:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 17:25 Failing devshell Dariusz Pelowski
2015-11-26 17:46 ` Leonardo Sandoval
2015-11-26 19:10   ` Dariusz Pelowski
2015-11-26 19:33     ` Leonardo Sandoval
2015-11-26 20:01       ` Dariusz Pelowski
2015-11-27 12:45 ` Burton, Ross
2015-11-27 13:00   ` Dariusz Pelowski
  -- strict thread matches above, loose matches on Subject: below --
2015-11-27 13:49 Dariusz Pelowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.