Skip to contentSkip to conversation

ptests: Mark ptest-runner as rdepend instead of rrecommends

PATCH In review Khem Raj 2 participants 2 messages Oct 10, 2022 – Oct 12, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ptests: Mark ptest-runner as rdepend instead of rrecommends

This ensures all runtime deependencies eg. perl-modules recommendations are added to dependencies correctly

see [1]

[1] https://git.yoctoproject.org/poky/commit/?h=master&id=4705dd264681d908f144dd4d9bf1f6175f68d8b9

---
 meta/classes-recipe/ptest.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes-recipe/ptest.bbclass +1 -2
index 0383206a6d..36266ec161 100644
@@ -23,10 +23,9 @@ PTEST_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}"
 PTEST_ENABLED:class-native = ""
 PTEST_ENABLED:class-nativesdk = ""
 PTEST_ENABLED:class-cross-canadian = ""
-RDEPENDS:${PN}-ptest += "${PN}"
+RDEPENDS:${PN}-ptest += "${PN} ptest-runner"
 RDEPENDS:${PN}-ptest:class-native = ""
 RDEPENDS:${PN}-ptest:class-nativesdk = ""
-RRECOMMENDS:${PN}-ptest += "ptest-runner"
 
 PACKAGES =+ "${@bb.utils.contains('PTEST_ENABLED', '1', '${PN}-ptest', '', d)}"
 
Signature · 1 line
2.38.0
#1 lore raw
Quoted 3 lines · Khem Raj via lists.openembedded.org

This ensures all runtime deependencies eg. perl-modules recommendations are added to dependencies correctly

It doesn’t do that, though.

This makes images built with ptest-pkgs actually installed ptest-runner, because complementary packages are installed without recommends. This is a problem because an image with ptest packages installed should, by default, be able to run the tests with ptest-runner.

I’ve a less invasive change that I’m about to send which solved this specific problem by making ptest-pkgs install "*-ptest ptest-runner”.

However, this doesn’t solve your original problem, which was that if foo-ptest RDEPENDS on perl-modules, then perl-module’s RRECOMMENDS are not respected.

I’m thinking that if someone installs perl-modules they want the entire perl standard library module, so that RRECOMMENDS should be a RDEPENDS. Note that python3-modules already does this.

Ross