diff mbox series

uboot-config.bbclass: Don't bail out early in multi configs

Message ID 20220809102819.4118941-1-kexin.hao@windriver.com
State Accepted, archived
Commit 372798afe028569b07ac55e0dc1ff377d83d18bf
Headers show
Series uboot-config.bbclass: Don't bail out early in multi configs | expand

Commit Message

Kevin Hao Aug. 9, 2022, 10:28 a.m. UTC
Previously we had the support to build multiple u-boot configs for a
machine, but after the change in the commit 801a27d73b10
("uboot-config.bbclass: Raise error for bad key"), this anonymous
function would bail out after handling the first config in UBOOT_CONFIG.
This is definitely not what we want. Fix it by making sure all the
configs are handled.

Fixed: 801a27d73b10 ("uboot-config.bbclass: Raise error for bad key")
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 meta/classes/uboot-config.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index e8da8c7452ac..1fbd49824f9d 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -109,8 +109,10 @@  python () {
 
     if len(ubootconfig) > 0:
         for config in ubootconfig:
+            found = False
             for f, v in ubootconfigflags.items():
                 if config == f: 
+                    found = True
                     items = v.split(',')
                     if items[0] and len(items) > 3:
                         raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
@@ -125,6 +127,8 @@  python () {
                     else:
                         bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary)
                         d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary)
-                    return
-        raise bb.parse.SkipRecipe("The selected UBOOT_CONFIG key %s has no match in %s." % (ubootconfig, ubootconfigflags.keys()))
+                    break
+
+            if not found:
+                raise bb.parse.SkipRecipe("The selected UBOOT_CONFIG key %s has no match in %s." % (ubootconfig, ubootconfigflags.keys()))
 }