Skip to contentSkip to conversation

lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome

PATCH In review Andre McCurdy 2 participants 7 messages Dec 6, 2017 – Apr 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
---
 meta/lib/oe/terminal.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/terminal.py +1 -1
index 3c8ef59..df4c75b 100644
@@ -67,7 +67,7 @@ class Gnome(XTerminal):
         import tempfile
         pidfile = tempfile.NamedTemporaryFile(delete = False).name
         try:
-            sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
+            sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
             XTerminal.__init__(self, sh_cmd, title, env, d)
             while os.stat(pidfile).st_size <= 0:
                 continue
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

Quoted 8 lines

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

Ping.

Quoted 24 lines
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
---
 meta/lib/oe/terminal.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/terminal.py +1 -2
index 3c8ef59..df4c75b 100644
@@ -67,7 +67,7 @@ class Gnome(XTerminal):
         import tempfile
         pidfile = tempfile.NamedTemporaryFile(delete = False).name
         try:
-            sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
+            sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
             XTerminal.__init__(self, sh_cmd, title, env, d)
             while os.stat(pidfile).st_size <= 0:
                 continue
--

1.9.1

#2 lore raw
Quoted 11 lines · Andre McCurdy
Quoted 10 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Quoted 7 lines
Quoted 5 lines

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

Ping.

Ping again.

Quoted 24 lines
Quoted 24 lines
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
---
 meta/lib/oe/terminal.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/terminal.py +1 -2
index 3c8ef59..df4c75b 100644
@@ -67,7 +67,7 @@ class Gnome(XTerminal):
         import tempfile
         pidfile = tempfile.NamedTemporaryFile(delete = False).name
         try:
-            sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
+            sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
             XTerminal.__init__(self, sh_cmd, title, env, d)
             while os.stat(pidfile).st_size <= 0:
                 continue
--

1.9.1

#3 lore raw
Quoted 16 lines · Andre McCurdy
Quoted 15 lines · Andre McCurdy
Quoted 14 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It could be fixed by using an absolute path instead per test.

Ping.

Ping again.

And again...

It looks like this (and a couple of other patches) made it as far as:

http://git.openembedded.org/openembedded-core-contrib/log/?h=stable/morty-next

but then got stuck or forgotten?

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
---
 meta/lib/oe/terminal.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/terminal.py +1 -2
index 3c8ef59..df4c75b 100644
@@ -67,7 +67,7 @@ class Gnome(XTerminal):
         import tempfile
         pidfile = tempfile.NamedTemporaryFile(delete = False).name
         try:
-            sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
+            sh_cmd = bb.utils.which(os.getenv('PATH'), "oe-gnome-terminal-phonehome") + " " + pidfile + " " + sh_cmd
             XTerminal.__init__(self, sh_cmd, title, env, d)
             while os.stat(pidfile).st_size <= 0:
                 continue
--

1.9.1

#4 lore raw
Quoted 23 lines · Andre McCurdy
Quoted 16 lines · Andre McCurdy
Quoted 15 lines · Andre McCurdy
Quoted 14 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It could be fixed by using an absolute path instead per test.

Ping.

Ping again.

Quoted 7 lines

And again...

It looks like this (and a couple of other patches) made it as far as:

http://git.openembedded.org/openembedded-core-contrib/log/?h=stable/morty-next

but then got stuck or forgotten?

Ping number four.

As an interesting data point, it's now over 20 months since the bug was introduced and first reported on the mailing list:

http://lists.openembedded.org/pipermail/openembedded-core/2016-July/124215.html

#5 lore raw
Quoted 41 lines · Andre McCurdy
Quoted 39 lines · Andre McCurdy

On Wed, Feb 21, 2018 at 1:40 PM, Andre McCurdy <[email protected]

Quoted 26 lines

wrote:

Quoted 22 lines · Andre McCurdy
Quoted 19 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is
the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal- phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the
child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

Quoted 3 lines
Quoted 2 lines
Quoted 1 line

It could be fixed by using an absolute path instead per test.

Ping.

Ping again.

And again...

It looks like this (and a couple of other patches) made it as far as:

  http://git.openembedded.org/openembedded-core-contrib/log/?h=stab
le/morty-next

Quoted 8 lines
Quoted 1 line

but then got stuck or forgotten?

Ping number four.

As an interesting data point, it's now over 20 months since the bug was introduced and first reported on the mailing list:

  http://lists.openembedded.org/pipermail/openembedded-core/2016-July
/124215.html

Sorry, I think the problem is my mail archives don't seem to have this original patch. Each time there is a ping, I go and try and find it, get confused and then get distracted. I have no idea why this isn't there.

I've queued it in morty-next which should give some hope to this getting sorted, assuming we can fix the other morty breakage and get clean builds.

Cheers,

Richard

#6 lore raw
Quoted 48 lines · Richard Purdie
Quoted 47 lines · Andre McCurdy
Quoted 33 lines · Andre McCurdy

On Wed, Feb 21, 2018 at 1:40 PM, Andre McCurdy <[email protected]

Quoted 26 lines

wrote:

Quoted 22 lines · Andre McCurdy
Quoted 19 lines · Andre McCurdy

From: Ming Liu <[email protected]>

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is
the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal- phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the
child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

Quoted 3 lines
Quoted 2 lines
Quoted 1 line

It could be fixed by using an absolute path instead per test.

Ping.

Ping again.

And again...

Quoted 7 lines

It looks like this (and a couple of other patches) made it as far as:

http://git.openembedded.org/openembedded-core-contrib/log/?h=stab
le/morty-next

but then got stuck or forgotten?

Ping number four.

As an interesting data point, it's now over 20 months since the bug was introduced and first reported on the mailing list:

Quoted 7 lines
Quoted 2 lines

http://lists.openembedded.org/pipermail/openembedded-core/2016-July
/124215.html

Sorry, I think the problem is my mail archives don't seem to have this original patch. Each time there is a ping, I go and try and find it, get confused and then get distracted. I have no idea why this isn't there.

A bit of a mystery. It looks like Armin may have had a similar problem taking the patch from the mailing list as the version he checked in has a spurious whitespace change which wasn't there in the original:

http://lists.openembedded.org/pipermail/openembedded-core/2017-December/145305.html
http://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/morty-next&id=4c36c5110b822eeac06b2b336917ba4d8b54a247

Quoted 3 lines

I've queued it in morty-next which should give some hope to this getting sorted, assuming we can fix the other morty breakage and get clean builds.

Thanks.