All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Changqing Li <changqing.li@windriver.com>,
	"openembedded-devel@lists.openembedded.org"
	<openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [PATCH] nmap: change shebang to python3
Date: Tue, 11 May 2021 08:09:43 +0000	[thread overview]
Message-ID: <6e1bad6721584e21b951b506a55d9427@XBOX03.axis.com> (raw)
In-Reply-To: <20210511074724.2790-1-changqing.li@windriver.com>

> -----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


  reply	other threads:[~2021-05-11  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  7:47 Changqing Li
2021-05-11  8:09 ` Peter Kjellerstedt [this message]
2021-05-11  8:20   ` [oe] " Changqing Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e1bad6721584e21b951b506a55d9427@XBOX03.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=changqing.li@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --subject='Re: [oe] [PATCH] nmap: change shebang to python3' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.