Message ID | 20230802170036.9288-1-Robert.Berger@ReliableEmbeddedSystems.com |
---|---|
State | New |
Headers | show |
Series | [meta-oe] replace /usr/bin/env python -> python3 | expand |
Does it work when you re-execute do_configure or do you get python33? I think you should anchor the regexp with '$'. On Wed, Aug 2, 2023 at 7:00 PM Robert Berger <oecore.mailinglist@gmail.com> wrote: > Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> > --- > meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb > b/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb > index 4e1edc6ce..851acd745 100644 > --- a/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb > +++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb > @@ -30,6 +30,7 @@ EXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \ > with_elfutils=/use/libelf/from/sysroot" > > do_configure() { > + find . -type f -exec sed -i 's/#!\/usr\/bin\/env > python/#!\/usr\/bin\/env python3/g' {} + > ${S}/configure ${EXTRA_UFTRACE_OECONF} > } > > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#104204): > https://lists.openembedded.org/g/openembedded-devel/message/104204 > Mute This Topic: https://lists.openembedded.org/mt/100509860/3617156 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ > Martin.Jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
Hi, On 02/08/2023 19:07, Martin Jansa wrote: > Does it work when you re-execute do_configure or do you get python33? I > think you should anchor the regexp with '$'. I think you are right - Let me play around a bit and I'll send v2.
On Wed, Aug 2, 2023 at 10:17 AM Robert Berger < robert.berger.oe.devel@gmail.com> wrote: > Hi, > > On 02/08/2023 19:07, Martin Jansa wrote: > > Does it work when you re-execute do_configure or do you get python33? I > > think you should anchor the regexp with '$'. > > I think you are right - Let me play around a bit and I'll send v2. > > You can also use '1s' to only change the first line. NOTE: the subject should include the package being fixed, otherwise it sounds global which it is not " uftrace: replace /usr/bin/env python -> python3"
It is also better to do a change like this using a patch rather than with sed. Because if upstream changes the shebang line of the script or removes it, the patch will no longer apply and someone will update it or remove it, whereas the sed command may remain long after it is no longer needed. //Peter From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Tim Orling Sent: den 2 augusti 2023 20:26 To: Robert Berger <robert.berger.oe.devel@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com>; Robert Berger <oecore.mailinglist@gmail.com>; openembedded-devel@lists.openembedded.org; Robert Berger <Robert.Berger@reliableembeddedsystems.com> Subject: Re: [oe] [meta-oe][PATCH] replace /usr/bin/env python -> python3 On Wed, Aug 2, 2023 at 10:17 AM Robert Berger <robert.berger.oe.devel@gmail.com<mailto:robert.berger.oe.devel@gmail.com>> wrote: Hi, On 02/08/2023 19:07, Martin Jansa wrote: > Does it work when you re-execute do_configure or do you get python33? I > think you should anchor the regexp with '$'. I think you are right - Let me play around a bit and I'll send v2. You can also use '1s' to only change the first line. NOTE: the subject should include the package being fixed, otherwise it sounds global which it is not " uftrace: replace /usr/bin/env python -> python3" -- Robert Berger Embedded Software Evangelist Reliable Embedded Systems Consulting Training Engineering URL: https://www.reliableembeddedsystems.com Schedule a web meeting: https://calendly.com/reliableembeddedsystems/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb b/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb index 4e1edc6ce..851acd745 100644 --- a/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb +++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb @@ -30,6 +30,7 @@ EXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \ with_elfutils=/use/libelf/from/sysroot" do_configure() { + find . -type f -exec sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python3/g' {} + ${S}/configure ${EXTRA_UFTRACE_OECONF} }
Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> --- meta-oe/recipes-devtools/uftrace/uftrace_0.13.1.bb | 1 + 1 file changed, 1 insertion(+)