diff mbox series

ptests: Mark ptest-runner as rdepend instead of rrecommends

Message ID 20221010213814.1678227-1-raj.khem@gmail.com
State New
Headers show
Series ptests: Mark ptest-runner as rdepend instead of rrecommends | expand

Commit Message

Khem Raj Oct. 10, 2022, 9:38 p.m. UTC
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
---
 meta/classes-recipe/ptest.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ross Burton Oct. 12, 2022, 4:18 p.m. UTC | #1
On 10 Oct 2022, at 22:38, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote:
> 
> 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
diff mbox series

Patch

diff --git a/meta/classes-recipe/ptest.bbclass b/meta/classes-recipe/ptest.bbclass
index 0383206a6d..36266ec161 100644
--- a/meta/classes-recipe/ptest.bbclass
+++ b/meta/classes-recipe/ptest.bbclass
@@ -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)}"