* [PATCH] nmap: change shebang to python3
@ 2021-05-11 7:47 Changqing Li
2021-05-11 8:09 ` [oe] " Peter Kjellerstedt
0 siblings, 1 reply; 3+ messages in thread
From: Changqing Li @ 2021-05-11 7:47 UTC (permalink / raw)
To: openembedded-devel
From: Changqing Li <changqing.li@windriver.com>
upstream nmap is python2 compatiable now, but this recipe
support python3.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
meta-oe/recipes-security/nmap/nmap_7.80.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta-oe/recipes-security/nmap/nmap_7.80.bb b/meta-oe/recipes-security/nmap/nmap_7.80.bb
index c76d2324e..ad5e7248e 100644
--- a/meta-oe/recipes-security/nmap/nmap_7.80.bb
+++ b/meta-oe/recipes-security/nmap/nmap_7.80.bb
@@ -53,6 +53,9 @@ do_install_append() {
if [ -f "${D}${bindir}/ndiff" ]; then
sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/ndiff
fi
+ if [ -f "${D}${bindir}/uninstall_ndiff" ]; then
+ sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/uninstall_ndiff
+ fi
}
FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [oe] [PATCH] nmap: change shebang to python3
2021-05-11 7:47 [PATCH] nmap: change shebang to python3 Changqing Li
@ 2021-05-11 8:09 ` Peter Kjellerstedt
2021-05-11 8:20 ` Changqing Li
0 siblings, 1 reply; 3+ messages in thread
From: Peter Kjellerstedt @ 2021-05-11 8:09 UTC (permalink / raw)
To: Changqing Li, openembedded-devel
> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-
> devel@lists.openembedded.org> On Behalf Of Changqing Li
> Sent: den 11 maj 2021 09:47
> To: openembedded-devel@lists.openembedded.org
> Subject: [oe] [PATCH] nmap: change shebang to python3
>
> From: Changqing Li <changqing.li@windriver.com>
>
> upstream nmap is python2 compatiable now, but this recipe
> support python3.
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> meta-oe/recipes-security/nmap/nmap_7.80.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta-oe/recipes-security/nmap/nmap_7.80.bb b/meta-oe/recipes-
> security/nmap/nmap_7.80.bb
> index c76d2324e..ad5e7248e 100644
> --- a/meta-oe/recipes-security/nmap/nmap_7.80.bb
> +++ b/meta-oe/recipes-security/nmap/nmap_7.80.bb
> @@ -53,6 +53,9 @@ do_install_append() {
> if [ -f "${D}${bindir}/ndiff" ]; then
> sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/ndiff
> fi
> + if [ -f "${D}${bindir}/uninstall_ndiff" ]; then
> + sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/uninstall_ndiff
> + fi
This can be simplified to:
for cmd in ndiff uninstall_ndiff; do
if [ -f "${D}${bindir}/$cmd" ]; then
sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$cmd
fi
done
> }
>
> FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
> --
> 2.17.1
//Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [oe] [PATCH] nmap: change shebang to python3
2021-05-11 8:09 ` [oe] " Peter Kjellerstedt
@ 2021-05-11 8:20 ` Changqing Li
0 siblings, 0 replies; 3+ messages in thread
From: Changqing Li @ 2021-05-11 8:20 UTC (permalink / raw)
To: Peter Kjellerstedt, openembedded-devel
On 5/11/21 4:09 PM, Peter Kjellerstedt wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
>> -----Original Message-----
>> From: openembedded-devel@lists.openembedded.org <openembedded-
>> devel@lists.openembedded.org> On Behalf Of Changqing Li
>> Sent: den 11 maj 2021 09:47
>> To: openembedded-devel@lists.openembedded.org
>> Subject: [oe] [PATCH] nmap: change shebang to python3
>>
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> upstream nmap is python2 compatiable now, but this recipe
>> support python3.
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>> meta-oe/recipes-security/nmap/nmap_7.80.bb | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/meta-oe/recipes-security/nmap/nmap_7.80.bb b/meta-oe/recipes-
>> security/nmap/nmap_7.80.bb
>> index c76d2324e..ad5e7248e 100644
>> --- a/meta-oe/recipes-security/nmap/nmap_7.80.bb
>> +++ b/meta-oe/recipes-security/nmap/nmap_7.80.bb
>> @@ -53,6 +53,9 @@ do_install_append() {
>> if [ -f "${D}${bindir}/ndiff" ]; then
>> sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/ndiff
>> fi
>> + if [ -f "${D}${bindir}/uninstall_ndiff" ]; then
>> + sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/uninstall_ndiff
>> + fi
> This can be simplified to:
>
> for cmd in ndiff uninstall_ndiff; do
> if [ -f "${D}${bindir}/$cmd" ]; then
> sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$cmd
> fi
> done
Thanks. Have sent a V2 patch
>
>> }
>>
>> FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
>> --
>> 2.17.1
> //Peter
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-11 8:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 7:47 [PATCH] nmap: change shebang to python3 Changqing Li
2021-05-11 8:09 ` [oe] " Peter Kjellerstedt
2021-05-11 8:20 ` Changqing Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.