summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2020-02-22 11:37:24 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-22 23:57:27 +0000
commit3a1a18ba9d28adb5562eabe9ec354f6d93154f5c (patch)
tree758afa77b8193484bff97f87c7028dea0d4ac75d /meta/recipes-kernel/perf
parent28333a851ffee3f5865ec97a8d098022efaf5147 (diff)
downloadpoky-3a1a18ba9d28adb5562eabe9ec354f6d93154f5c.tar.gz
perf: Correct the substitution of python shebangs
To make the native python3 always used, - Use sed one-liner instead - Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the following warning. File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) ModuleNotFoundError: No module named '_sysconfigdata' This issue is first reported by Joel Stanley <joel@jms.id.au> The sed one-liner is credited to Anuj Mittal <anuj.mittal@intel.com> (From OE-Core rev: 3f93173130a94310255389cfc62c67102a4fb21b) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r--meta/recipes-kernel/perf/perf.bb7
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b06693d..10a5b88260 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -239,11 +239,8 @@ do_configure_prepend () {
239 fi 239 fi
240 240
241 # use /usr/bin/env instead of version specific python 241 # use /usr/bin/env instead of version specific python
242 for s in `find ${S}/tools/perf/ -name '*.py'`; do 242 for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do
243 sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}" 243 sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
244 sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
245 sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
246 sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
247 done 244 done
248 245
249 # unistd.h can be out of sync between libc-headers and the captured version in the perf source 246 # unistd.h can be out of sync between libc-headers and the captured version in the perf source