* [PATCH 0/1] tinfoil: ensure PATH includes bitbake's bin directory
@ 2017-02-09 3:42 Paul Eggleton
2017-02-09 3:42 ` [PATCH 1/1] " Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2017-02-09 3:42 UTC (permalink / raw)
To: bitbake-devel
The following changes since commit 95deecabfffdb6a7009ecc385c8b12290fbfcb73:
bitbake: Update version to 1.33.1 (2017-02-07 14:35:48 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/tinfoil-path
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/tinfoil-path
Paul Eggleton (1):
tinfoil: ensure PATH includes bitbake's bin directory
lib/bb/tinfoil.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
--
2.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] tinfoil: ensure PATH includes bitbake's bin directory
2017-02-09 3:42 [PATCH 0/1] tinfoil: ensure PATH includes bitbake's bin directory Paul Eggleton
@ 2017-02-09 3:42 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2017-02-09 3:42 UTC (permalink / raw)
To: bitbake-devel
The runqueue expects to be able to run 'bitbake-worker' from PATH, but
for example in the OE extensible SDK, tinfoil is used within devtool
where this isn't the case (we're not exposing bitbake to the user, thus
bitbake's bin directory isn't in PATH).
This fixes devtool modify usage within the extensible SDK which has
apparently been broken since the tinfoil2 changes went in.
Fixes [YOCTO #11034].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
lib/bb/tinfoil.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 96275fd..940f9ab 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -211,6 +211,19 @@ class Tinfoil:
self.ui_module = ui_module
+ # Ensure the path to bitbake's bin directory is in PATH so that things like
+ # bitbake-worker can be run (usually this is the case, but it doesn't have to be)
+ path = os.getenv('PATH').split(':')
+ bitbakebinpath = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'bin'))
+ for entry in path:
+ if entry.endswith(os.sep):
+ entry = entry[:-1]
+ if os.path.abspath(entry) == bitbakebinpath:
+ break
+ else:
+ path.insert(0, bitbakebinpath)
+ os.environ['PATH'] = ':'.join(path)
+
if self.server_connection:
_server_connections.append(self.server_connection)
if config_only:
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-09 3:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 3:42 [PATCH 0/1] tinfoil: ensure PATH includes bitbake's bin directory Paul Eggleton
2017-02-09 3:42 ` [PATCH 1/1] " Paul Eggleton
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.