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
From e49c5fc72ae69f6a43231f42bc5494b84b1c85bb Mon Sep 17 00:00:00 2001
From: Dariusz Pelowski <dariusz.pelow...@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

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to