diff mbox series

[meta-oe] nmap: make python3 RDEPENDS conditional on ndiff

Message ID 20260330080449.446406-1-paolo.barbolini@m4ss.net
State Under Review
Headers show
Series [meta-oe] nmap: make python3 RDEPENDS conditional on ndiff | expand

Commit Message

Paolo Barbolini March 30, 2026, 8:04 a.m. UTC
When ndiff was disabled by default in 51e070301e ("nmap: disable
ndiff"), the python3 RDEPENDS were left unconditional on the main
package. This causes python3-difflib, python3-asyncio and python3-xml
to be pulled into every image that includes nmap, even though ndiff is
not built and the core nmap binary (C++) does not need Python.

Gate the RDEPENDS behind the ndiff PACKAGECONFIG so that Python is only
required when ndiff is actually enabled.

Signed-off-by: Paolo Barbolini <paolo.barbolini@m4ss.net>
---
 meta-oe/recipes-security/nmap/nmap_7.92.bb | 6 +-----
 meta-oe/recipes-security/nmap/nmap_7.95.bb | 6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-security/nmap/nmap_7.92.bb b/meta-oe/recipes-security/nmap/nmap_7.92.bb
index 98969fe001..33767dfb96 100644
--- a/meta-oe/recipes-security/nmap/nmap_7.92.bb
+++ b/meta-oe/recipes-security/nmap/nmap_7.92.bb
@@ -59,8 +59,4 @@  do_install:append() {
 
 FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
 
-RDEPENDS:${PN} += " \
-    python3-difflib \
-    python3-asyncio \
-    python3-xml \
-"
+RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'ndiff', 'python3-difflib python3-asyncio python3-xml', '', d)}"
diff --git a/meta-oe/recipes-security/nmap/nmap_7.95.bb b/meta-oe/recipes-security/nmap/nmap_7.95.bb
index a892c1e910..8841a8cd78 100644
--- a/meta-oe/recipes-security/nmap/nmap_7.95.bb
+++ b/meta-oe/recipes-security/nmap/nmap_7.95.bb
@@ -59,8 +59,4 @@  do_install:append() {
 
 FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat"
 
-RDEPENDS:${PN} += " \
-    python3-difflib \
-    python3-asyncio \
-    python3-xml \
-"
+RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'ndiff', 'python3-difflib python3-asyncio python3-xml', '', d)}"