From: Phil Blundell <pb@pbcl.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] lttng-ust: Patch python shebang appropriately for native builds
Date: Wed, 14 Dec 2016 21:38:00 +0000 [thread overview]
Message-ID: <1481751480.3851.14.camel@pbcl.net> (raw)
If we are building a native package then ${bindir}/python3 is not guaranteed
to be available, and if it is available then it is probably a directory not a
file. In either case, attempting to use it as an interpreter will not end
well. Let's use ${bindir}/nativepython instead.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
meta/recipes-kernel/lttng/lttng-ust_git.bb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/lttng/lttng-ust_git.bb b/meta/recipes-kernel/lttng/lttng-ust_git.bb
index 5869093..df22352 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_git.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_git.bb
@@ -29,10 +29,12 @@ SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.7 \
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+usepython="${bindir}/python3"
+usepython_class-native="${bindir}/nativepython"
do_install_append() {
# Patch python tools to use Python 3; they should be source compatible, but
# still refer to Python 2 in the shebang
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
+ sed -i -e '1s,#!.*python.*,#!${usepython},' ${D}${bindir}/lttng-gen-tp
}
S = "${WORKDIR}/git"
--
2.10.1
next reply other threads:[~2016-12-14 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 21:38 Phil Blundell [this message]
2016-12-14 23:38 ` [PATCH] lttng-ust: Patch python shebang appropriately for native builds Khem Raj
2016-12-15 8:43 ` Burton, Ross
2016-12-15 12:11 ` Phil Blundell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481751480.3851.14.camel@pbcl.net \
--to=pb@pbcl.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox