From: Jiaying Song Date: Tue, 28 Oct 2025 10:18:07 +0000 (+0800) Subject: kernel-devsrc: fix incorrect python shebang replacement X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c548259dbf55f2194088e62ad018560286834e49;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git kernel-devsrc: fix incorrect python shebang replacement Update the sed replacement rule to strictly match '/usr/bin/python' (with no trailing characters) The previous sed rule was too broad and could incorrectly change Python shebangs such as in /lib/modules/6.16.11-yocto-standard/build/scripts/macro_checker.py from '#!/usr/bin/python3' to '#!/usr/bin/env python33'. Signed-off-by: Jiaying Song Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb index 04dd683dde..411c99ba30 100644 --- a/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb @@ -400,7 +400,7 @@ do_install() { for ss in $(find $kerneldir/build/scripts -type f -name '*'); do sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss" sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss" - sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss" + sed -i 's,/usr/bin/python$,/usr/bin/env python3,' "$ss" done chown -R root:root ${D}