Skip to contentSkip to conversation

bitbake-layers: initialize tinfoil before registering command line arguments

PATCH New Alexander Kanavin 1 participant 1 message Aug 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-layers: initialize tinfoil before registering command line arguments

Plugins may want to use it (e.g. the layers-setup plugin that would want to discover writer sub-plugins with it), and so it makes sense to make tinfoil available a bit eariler.

---
 bitbake/bin/bitbake-layers | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/bin/bitbake-layers +2 -2
index 449434d468..d4b1d1aaf2 100755
@@ -68,11 +68,11 @@ def main():
 
         registered = False
         for plugin in plugins:
+            if hasattr(plugin, 'tinfoil_init'):
+                plugin.tinfoil_init(tinfoil)
             if hasattr(plugin, 'register_commands'):
                 registered = True
                 plugin.register_commands(subparsers)
-            if hasattr(plugin, 'tinfoil_init'):
-                plugin.tinfoil_init(tinfoil)
 
         if not registered:
             logger.error("No commands registered - missing plugins?")
Signature · 1 line
2.30.2