[1/1] linux-distro: Fix check for native or compat override

Message ID 20260527122221.1477287-1-felix.moessbauer@siemens.com
State Priority Review
Headers show
Series [1/1] linux-distro: Fix check for native or compat override | expand

Commit Message

Felix Moessbauer May 27, 2026, 12:22 p.m. UTC
We must not inject the stubs on compat or native, as otherwise we get
the multiple providers warning. Commit 367c5d99 tried to fix this, but
used incorrect Python syntax to express the condition. By that, only the
class-native was excluded, but not compat.

Fixes: 367c5d99 ("linux-distro: Fix multiple provider warnings")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/recipes-kernel/linux/linux-distro.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb
index 638ad65a..8fc1bcb7 100644
--- a/meta/recipes-kernel/linux/linux-distro.bb
+++ b/meta/recipes-kernel/linux/linux-distro.bb
@@ -6,7 +6,8 @@ 
 # SPDX-License-Identifier: MIT
 
 python() {
-    if ("class-native" or "class-compat") in d.getVar("OVERRIDES").split(":"):
+    overrides = d.getVar("OVERRIDES").split(":")
+    if any(o in overrides for o in ("class-native", "class-compat")):
         return
 
     distro_kernels = d.getVar('DISTRO_KERNELS') or ""