diff mbox series

[scarthgap] nftables: avoid python dependencies when building without python

Message ID 20240924132937.119853-1-nikhilr5@kpit.com
State New
Headers show
Series [scarthgap] nftables: avoid python dependencies when building without python | expand

Commit Message

Nikhil R Sept. 24, 2024, 1:29 p.m. UTC
From: Michael Olbrich <m.olbrich@pengutronix.de>

Use inherit_defer instead of inhert. This way, setuptools3 is not
inherited when python is removed from PACKAGECONFIG in a .bbappend file.
This avoids dependencies added by setuptools3.

Don't add nftables-python to PACKAGES if python is disabled. It adds
extra runtime dependencies on python3-core and python3-json.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 5cf3766cf6395d4bfa5de20cf7427950ca498eaa)
Signed-off-by: Nikhil R <nikhil.r@kpit.com>
---
 meta-networking/recipes-filter/nftables/nftables_1.0.9.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.25.1

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
diff mbox series

Patch

diff --git a/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb b/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
index 771892274..17f00ffd4 100644
--- a/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
+++ b/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
@@ -35,9 +35,9 @@  EXTRA_OECONF = " \

 SETUPTOOLS_SETUP_PATH = "${S}/py"

-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}
+inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}

-PACKAGES =+ "${PN}-python"
+PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)}"
 FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
 RDEPENDS:${PN}-python = "python3-core python3-json ${PN}"