Skip to contentSkip to conversation

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

PATCH New Nikhil R 1 participant 1 message Sep 24, 2024

lore
Share & tools
lore

Nikhil R

author
#0 lore raw

PATCH 1/1 nftables: Conditionally add ${PN}-python as RDEPENDS for ptest

From: Nikhil R <[email protected]>

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

---
 meta-networking/recipes-filter/nftables/nftables_1.0.9.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-networking/recipes-filter/nftables/nftables_1.0.9.bb +4 -1
index 43d606f5d..245b86135 100644
@@ -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"
 

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