Skip to contentSkip to conversation

ptest.bbclass: fix path for multilib

PATCH In review Kyle Russell 2 participants 4 messages Feb 16, 2018 – Mar 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptest.bbclass: fix path for multilib

ptest-runner always looks at /usr/lib, so make this arch independent.

---
 meta/classes/ptest.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/ptest.bbclass +1 -1
index c19f65b..62b3621 100644
@@ -2,7 +2,7 @@ SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
 DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test purposes."
 
-PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PTEST_PATH ?= "${nonarch_libdir}/${BPN}/ptest"
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Kyle Russell

ptest-runner always looks at /usr/lib, so make this arch independent.

I'd say the bug here is in ptest-runner. I'd expect to be able to install libfoo-ptest and lib32-libfoo-ptest in parallel.

Ross

#2 lore raw

That's reasonable, but how would you propose that work? An analogous fix for ptest-runner is to use ${libdir} instead of /usr/lib (leaving the bbclass intact), but that just flips the problem if you try to run lib32-libfoo-ptest using a 64-bit ptest-runner with default arguments (not specifying -d /usr/lib). Alternatively, I suppose ptest-runner could look in multiple directories by default (for example, ${libdir} and ${nonarch_libdir}, assuming they're different). Although, it almost feels like the run-ptest scripts should really be installed to ${libexecdir}.

I'll be glad to workup a different patch, but I want to make sure I understand the desired design.

Quoted 10 lines · Ross
Quoted 2 lines · Kyle Russell

ptest-runner always looks at /usr/lib, so make this arch independent.

I'd say the bug here is in ptest-runner. I'd expect to be able to install libfoo-ptest and lib32-libfoo-ptest in parallel.

Ross

#3 lore raw

I logged a bug for this so not to lose track of it. I'll be glad to do the work, but I want to make sure it's valuable if something more than a trivial fix is desired.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=12604

Quoted 28 lines · Kyle Russell

That's reasonable, but how would you propose that work? An analogous fix for ptest-runner is to use ${libdir} instead of /usr/lib (leaving the bbclass intact), but that just flips the problem if you try to run lib32-libfoo-ptest using a 64-bit ptest-runner with default arguments (not specifying -d /usr/lib). Alternatively, I suppose ptest-runner could look in multiple directories by default (for example, ${libdir} and ${nonarch_libdir}, assuming they're different). Although, it almost feels like the run-ptest scripts should really be installed to ${libexecdir}.

I'll be glad to workup a different patch, but I want to make sure I understand the desired design.

Quoted 11 lines · Ross
Quoted 2 lines · Kyle Russell

ptest-runner always looks at /usr/lib, so make this arch independent.

I'd say the bug here is in ptest-runner. I'd expect to be able to install libfoo-ptest and lib32-libfoo-ptest in parallel.

Ross