Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH] itstool: Use python3 binary fom PATH instead of /usr/bin/python3
@ 2019-07-26 15:39 Piotr Tworek
  2019-07-26 15:57 ` Burton, Ross
  2019-07-26 16:01 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 2 replies; 6+ messages in thread
From: Piotr Tworek @ 2019-07-26 15:39 UTC (permalink / raw)
  To: openembedded-core

Although /usr/bin/python3 works fine for class-target builds its not
really what we want for class-native. The host system might not even
have python3 installed. The native itstool version should use pythn3
provided in recipe-sysroot-native. To accomplish it modify the default
shebang to use /usr/bin/env. This works as expected for both native and
target builds.

Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
---
 meta-oe/recipes-support/itstool/itstool_2.0.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/itstool/itstool_2.0.5.bb b/meta-oe/recipes-support/itstool/itstool_2.0.5.bb
index a0af44a71..f21e7f39b 100644
--- a/meta-oe/recipes-support/itstool/itstool_2.0.5.bb
+++ b/meta-oe/recipes-support/itstool/itstool_2.0.5.bb
@@ -13,7 +13,7 @@ SRC_URI[sha256sum] = "100506f8df62cca6225ec3e631a8237e9c04650c77495af4919ac6a100
 
 do_install_append() {
     # fix shebang of main script
-    sed -i 's:^#!${WORKDIR}.*${PYTHON_PN} -s:#!${bindir_native}/${PYTHON_PN} -s:' ${D}${bindir}/itstool
+    sed -i 's:^#!${WORKDIR}.*${PYTHON_PN} -s:#!${bindir_native}/env -S ${PYTHON_PN} -s:' ${D}${bindir}/itstool
 }
 
 BBCLASSEXTEND = "native"
-- 
2.21.0



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

end of thread, other threads:[~2019-07-26 21:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-26 15:39 [meta-oe][PATCH] itstool: Use python3 binary fom PATH instead of /usr/bin/python3 Piotr Tworek
2019-07-26 15:57 ` Burton, Ross
2019-07-26 18:30   ` Piotr Tworek
2019-07-26 18:50     ` Alexander Kanavin
2019-07-26 21:35       ` Khem Raj
2019-07-26 16:01 ` ✗ patchtest: failure for " Patchwork

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