From 6e1442dd891653c3be15d4db9248e179ca196b67 Mon Sep 17 00:00:00 2001 From: Xiangyu Chen Date: Sun, 28 May 2023 12:41:06 +0800 Subject: [PATCH 1/2] bcc: updating the shebang of python scripts in tools to python3 the upstream changed the shebang of python scripts in tools folder[1], this would cause do_install:append cannot conver all scripts. [1] https://github.com/iovisor/bcc/commit/3f5e402bcadf44ce0250864db52673bf7317797b Signed-off-by: Xiangyu Chen --- .../openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb index 9bd6b4f2..ba773b62 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.26.0.bb @@ -55,6 +55,8 @@ EXTRA_OECMAKE = " \ " do_install:append() { + sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \ + -i $(find ${D}${datadir}/${PN} -type f) sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ -i $(find ${D}${datadir}/${PN} -type f) } From 016d07ec50fea4ff4080cb080984b52636715cdd Mon Sep 17 00:00:00 2001 From: Xiangyu Chen Date: Wed, 12 Jul 2023 14:00:48 +0800 Subject: [PATCH 2/2] bcc: fix some of python script with wrong shebang examples/tracing/nflatency.py has already upgraded the shebang to python3 on upstream, so when we apply the do_install:append function, the shebang of nflatency.py become /usr/bin/env python33 Signed-off-by: Xiangyu Chen --- .../openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb index 530b4686..105995d2 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb @@ -58,7 +58,7 @@ EXTRA_OECMAKE = " \ do_install:append() { sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \ -i $(find ${D}${datadir}/${PN} -type f) - sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ + sed -e 's@#!/usr/bin/python.*@#!/usr/bin/env python3@g' \ -i $(find ${D}${datadir}/${PN} -type f) }