Skip to contentSkip to conversation

cmake-qemu.bbclass: fix if criterion

PATCH New [email protected] 1 participant 1 message Jun 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmake-qemu.bbclass: fix if criterion

From: Kai Kang <[email protected]>

It always executes the scripts whether 'qemu-usermode' in 'MACHINE_FEATURES' or not. Fix the criterion to make it work.

---
 meta/classes-recipe/cmake-qemu.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/cmake-qemu.bbclass +1 -1
index 46a89e2827..383fc74bf2 100644
@@ -19,7 +19,7 @@ inherit qemu cmake
 DEPENDS:append:class-target = "${@' qemu-native' if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) else ''}"
 
 cmake_do_generate_toolchain_file:append:class-target() {
-    if [ "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)}" ]; then
+    if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then
         # Write out a qemu wrapper that will be used as exe_wrapper so that cmake
         # can run target helper binaries through that. This also allows to execute ctest.
         qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_HOST}', ['${STAGING_DIR_HOST}/${libdir}','${STAGING_DIR_HOST}/${base_libdir}'])}"
Signature · 1 line
2.34.1