From: Anuj Mittal Date: Thu, 13 Jun 2019 00:28:48 +0000 (+0800) Subject: python3-scons: fix regex replacing python by python3 X-Git-Tag: uninative-2.6~76 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=144c6c7183dd2b32c65edf325038eb84683a28f8;p=openembedded-core.git python3-scons: fix regex replacing python by python3 Match only the first line and match even if the line says python3. Otherwise we end up with multiple 3s at the end after multiple invocations of do_install on same source. Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/python/python3-scons_3.0.5.bb b/meta/recipes-devtools/python/python3-scons_3.0.5.bb index 91e4a945e3..7fb75a627e 100644 --- a/meta/recipes-devtools/python/python3-scons_3.0.5.bb +++ b/meta/recipes-devtools/python/python3-scons_3.0.5.bb @@ -15,7 +15,7 @@ UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar" inherit setuptools3 do_install_prepend() { - sed -i -e "s:/usr/bin/env python:/usr/bin/env python3:g" ${S}/script/* + sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/* } RDEPENDS_${PN} = "\