]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
configfragments.py: Make list-fragments fail early
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 21 Nov 2025 13:25:32 +0000 (05:25 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Nov 2025 17:48:50 +0000 (17:48 +0000)
If a fragment has not been configured correctly, make list-fragments
fail with an error before it has output information about any built-in
fragments.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/bbconfigbuild/configfragments.py

index f5cbfc56ae07e7a4ace0849f67bc08f618a88be6..de521f0c149e55515936cea31001d31c9c5f2ef0 100644 (file)
@@ -75,11 +75,13 @@ class ConfigFragmentsPlugin(LayerPlugin):
                  print('{}\tSets {} = "{}"'.format(f, builtin_dict[prefix], value))
             print('')
 
+        allfragments = self.discover_fragments()
+
         all_enabled_fragments = (self.tinfoil.config_data.getVar('OE_FRAGMENTS') or "").split()
         all_builtin_fragments = (self.tinfoil.config_data.getVar('OE_FRAGMENTS_BUILTIN') or "").split()
         print_builtin_fragments(all_builtin_fragments, all_enabled_fragments)
 
-        for layername, layerdata in self.discover_fragments().items():
+        for layername, layerdata in allfragments.items():
             layerdir = layerdata['layerdir']
             fragments = layerdata['fragments']
             enabled_fragments = [f for f in fragments if f['name'] in all_enabled_fragments]