[v2] python3-scons: fix regex replacing python by python3

Submitted by Anuj Mittal on June 13, 2019, 12:28 a.m. | Patch ID: 162162

Details

Message ID 20190613002848.15030-1-anuj.mittal@intel.com
State Accepted
Commit 144c6c7183dd2b32c65edf325038eb84683a28f8
Headers show

Commit Message

Anuj Mittal June 13, 2019, 12:28 a.m.
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 <anuj.mittal@intel.com>
---
 meta/recipes-devtools/python/python3-scons_3.0.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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<pver>\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} = "\