diff mbox series

[master] nftables: Conditionally add ${PN}-python as RDEPENDS for ptest

Message ID 20240924134329.121885-1-nikhilr5@kpit.com
State New
Headers show
Series [master] nftables: Conditionally add ${PN}-python as RDEPENDS for ptest | expand

Commit Message

Nikhil R Sept. 24, 2024, 1:43 p.m. UTC
From: Nikhil R <nikhil.r@kpit.com>

This commit updates the RDEPENDS for the ptest package to include
${PN}-python only when the 'python' PACKAGECONFIG option is enabled.

This fix is required as ptest is enabled in the Distro features,
which was causing the following error:
ERROR: Nothing RPROVIDES 'nftables-python' (but /home/builder/src/base/node0/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'nftables-python' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['nftables-python']
ERROR: Required build target 'nftables' has no buildable providers.
Missing or unbuildable dependency chain was: ['nftables', 'nftables-python']

Signed-off-by: Nikhil R <nikhil.r@kpit.com>
---
 meta-networking/recipes-filter/nftables/nftables_1.0.9.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--
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 43d606f5d..245b86135 100644
--- a/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
+++ b/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
@@ -59,7 +59,10 @@  do_install() {
     fi
 }

-RDEPENDS:${PN}-ptest += " ${PN}-python bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux"
+RDEPENDS:${PN}-ptest += " \
+    bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \
+"

 TESTDIR = "tests"