]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
soc-family.inc: improve clarity at MACHINEOVERRIDES's prepend
authorJoão Marcos Costa <joaomarcos.costa@bootlin.com>
Fri, 24 Apr 2026 15:10:13 +0000 (17:10 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Apr 2026 13:28:14 +0000 (14:28 +0100)
Use Python's ternary operator "A if condition else B".

Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/conf/machine/include/soc-family.inc

index 1ff08998122a3f37c0fa435a3642636d61accc10..cdc7a5a64c229cf2fc644597902e4e60c8fe1301 100644 (file)
@@ -1,3 +1,3 @@
 # Add SOC_FAMILY to machine overrides so we get access to e.g. 'omap3' and 'ti335x'
 SOC_FAMILY ??= ""
-MACHINEOVERRIDES =. "${@['', '${SOC_FAMILY}:']['${SOC_FAMILY}' != '']}"
+MACHINEOVERRIDES =. "${@'${SOC_FAMILY}:' if '${SOC_FAMILY}' else '' }"