[OE-core] [PATCH] perf: Correct the substitution of python shebangs
zhe.he at windriver.com
zhe.he at windriver.com
Thu Feb 13 18:38:44 UTC 2020
From: He Zhe <zhe.he at windriver.com>
To make the native python3 are always used,
- Move the substitution of /usr/bin/python3 to first, otherwise the
possible original /usr/bin/python3 would be changed to
/usr/bin/env python33.
- Add substitution for ${S}/scripts/
Signed-off-by: He Zhe <zhe.he at windriver.com>
---
meta/recipes-kernel/perf/perf.bb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b066..14a9090 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -240,10 +240,17 @@ do_configure_prepend () {
# use /usr/bin/env instead of version specific python
for s in `find ${S}/tools/perf/ -name '*.py'`; do
+ sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
+ done
+
+ for s in `find ${S}/scripts/ -name '*.py'`; do
sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+ sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
+ sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
+ sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
done
# unistd.h can be out of sync between libc-headers and the captured version in the perf source
--
2.7.4
More information about the Openembedded-core
mailing list