diff mbox series

[V3,2/5] cpio: fix ptest-runner dependency

Message ID 20250414053503.1180029-2-Qi.Chen@windriver.com
State Accepted, archived
Commit ef705f6969845aa4b28cb2cfb95b0aa0c67c11e3
Headers show
Series [V3,1/5] classes/recipes: remove unnecessary qemu inherit and use qemuwrapper-cross | expand

Commit Message

ChenQi April 14, 2025, 5:35 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

ptest is only meaningful for target. So we need to specify class-target
override to ensure correct dependency.

Also, the above DEPENDS:append:class-targets lacks a leading whitespace,
add it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/cpio/cpio_2.15.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ross Burton April 17, 2025, 11:42 a.m. UTC | #1
On 14 Apr 2025, at 06:35, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote:
> Also, the above DEPENDS:append:class-targets lacks a leading whitespace,
> add it.

Not strictly true:

> -DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
> +DEPENDS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"

There’s whitespace in the value being added, so if PTEST_ENABLED is false you don’t get whitespace appended for no reason.

Ross
diff mbox series

Patch

diff --git a/meta/recipes-extended/cpio/cpio_2.15.bb b/meta/recipes-extended/cpio/cpio_2.15.bb
index b081bd53db..0b13ba103f 100644
--- a/meta/recipes-extended/cpio/cpio_2.15.bb
+++ b/meta/recipes-extended/cpio/cpio_2.15.bb
@@ -66,8 +66,8 @@  do_install_ptest_base:append() {
 }
 
 # The tests need to run as a non-root user, so pull in the ptest user
-DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
-PACKAGE_WRITE_DEPS += "ptest-runner"
+DEPENDS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
+PACKAGE_WRITE_DEPS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
 
 RDEPENDS:${PN}-ptest += "ptest-runner"