Skip to contentSkip to conversation

bitbake-setup: do not include prefix/ when using fragment names in setup directory variable expansions

PATCH New Alexander Kanavin 1 participant 1 message Nov 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-setup: do not include prefix/ when using fragment names in setup directory variable expansions

From: Alexander Kanavin <[email protected]>

Fragment prefixes are top level namespaces like distro/ machine/ yocto/ and so on; when constructing a setup directory name they are redundant and add clutter. If necessary, they can be re-added directly into the format string of the setup-dir-name parameter in the json config.

Particularly, the default setup dir names suggested by bitbake-setup in default configurations look a lot better:

Before:
distro_poky-master

After:
poky-master

---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-setup +1 -1
index 436456a47..75be90940 100755
@@ -501,7 +501,7 @@ def init_config(top_dir, settings, args):
         setup_dir_name = "{}-{}".format(upstream_config['name']," ".join(upstream_config['non-interactive-cmdline-options'][1:]).replace(" ","-").replace("/","_"))
         if 'setup-dir-name' in upstream_config['bitbake-config']:
             mapping = {
-                    k: v.replace(" ", "-").replace("/", "_")
+                    k: v.partition("/")[2].replace(" ", "-").replace("/", "_")
                     for k, v in upstream_config['bitbake-config']['oe-fragment-choices'].items()
             }
             config_setup_dir_name = string.Template(upstream_config['bitbake-config']['setup-dir-name']).substitute(mapping)
Signature · 1 line
2.39.5