Skip to contentSkip to conversation

nmap: change shebang to python3

PATCH New Changqing Li 1 participant 1 message May 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nmap: change shebang to python3

From: Changqing Li <[email protected]>

upstream nmap is python2 compatiable now, but this recipe supports python3.

---
 meta-oe/recipes-security/nmap/nmap_7.80.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta-oe/recipes-security/nmap/nmap_7.80.bb +5 -3
index c76d2324e..17bc40911 100644
@@ -50,9 +50,11 @@ do_configure() {
 }
 
 do_install_append() {
-    if [ -f "${D}${bindir}/ndiff" ]; then
-       sed -i 's@^#!.*$@#!/usr/bin/env python3@g'   ${D}${bindir}/ndiff
-    fi
+    for f in ndiff uninstall_ndiff; do
+        if [ -f ${D}${bindir}/$f ]; then
+            sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$f
+        fi
+    done
 }
 
 FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
Signature · 1 line
2.17.1