Skip to contentSkip to conversation

bitbake-config-build: add an alias to bitbake-layers intended for managing specific local configs

PATCH Superseded Alexander Kanavin 1 participant 1 message May 9, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-config-build: add an alias to bitbake-layers intended for managing specific local configs

From: Alexander Kanavin <[email protected]>

This was prompted by adding support for config fragments (in a separate commit to oe-core); after some deliberation I concluded there should be a separate tool, as bitbake-layers is already somewhat over-stuffed, and this will give space for more build/conf/* operations in the future that anyone can come up with (such as tweaking site-specific items in site.conf etc.)

The alias completely reuses existing code via symlink and the difference is in where it looks for plugins.

---
 bin/bitbake-config-build | 1 +
 bin/bitbake-layers       | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
 create mode 120000 bin/bitbake-config-build
bin/bitbake-config-build new file +1 -0
new file mode 120000
index 00000000..11e6df80
@@ -0,0 +1 @@
+bitbake-layers
\ No newline at end of file
bin/bitbake-layers +4 -2
index d4b1d1aa..ccda88e9 100755
@@ -18,13 +18,14 @@ import warnings
 warnings.simplefilter("default")
 
 bindir = os.path.dirname(__file__)
+toolname = os.path.basename(__file__).split(".")[0]
 topdir = os.path.dirname(bindir)
 sys.path[0:0] = [os.path.join(topdir, 'lib')]
 
 import bb.tinfoil
 import bb.msg
 
-logger = bb.msg.logger_create('bitbake-layers', sys.stdout)
+logger = bb.msg.logger_create(toolname, sys.stdout)
 
 def main():
     parser = argparse.ArgumentParser(
@@ -63,7 +64,8 @@ def main():
         tinfoil.prepare(True)
         for path in ([topdir] +
                     tinfoil.config_data.getVar('BBPATH').split(':')):
-            pluginpath = os.path.join(path, 'lib', 'bblayers')
+            pluginbasepath = {"bitbake-layers":'bblayers', 'bitbake-config-build':'bbconfigbuild'}[toolname]
+            pluginpath = os.path.join(path, 'lib', pluginbasepath)
             bb.utils.load_plugins(logger, plugins, pluginpath)
 
         registered = False
Signature · 1 line
2.39.2