[meta-oe] libgpiod: RRECOMMENDS bats, python3-packaging for libgpiod-ptest

Message ID 621316f6.1c69fb81.be8e5.9f34@mx.google.com
State New
Headers show
Series [meta-oe] libgpiod: RRECOMMENDS bats, python3-packaging for libgpiod-ptest | expand

Commit Message

Douglas Royds Feb. 21, 2022, 3:34 a.m. UTC
When ptest is included in the DISTRO_FEATURES, we were adding bats and
python3-packaging to the libgpiod RDEPENDS, and unwittingly dragging bash and
python3 into the rootfs whether libgpiod-ptest was installed or not.

Add bats and python3-packaging to the RRECOMMENDS for the libgpiod-ptest package only.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
index 51b74ba5b..c5323b417 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
@@ -14,7 +14,7 @@  SRC_URI[sha256sum] = "841be9d788f00bab08ef22c4be5c39866f0e46cb100a3ae49ed816ac9c
 
 inherit autotools pkgconfig python3native ptest
 
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2,bats python3-packaging"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
 PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
 PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
 
@@ -53,6 +53,7 @@  RRECOMMENDS:${PN}-ptest += " \
     kernel-module-gpio-mockup \
     coreutils \
     ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'tests', 'bats python3-packaging', '', d)} \
 "
 
 PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}"