From 5bf3fb2dbc84b36199066125527a69ec5c8d2c49 Mon Sep 17 00:00:00 2001 From: Rob Woolley Date: Thu, 5 Feb 2026 18:00:30 -0800 Subject: [PATCH] Use OpenEmbedded naming convention for recipe directories Signed-off-by: Rob Woolley --- mash/verb/bitbake.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mash/verb/bitbake.py b/mash/verb/bitbake.py index 14f6b9d..fe600e0 100644 --- a/mash/verb/bitbake.py +++ b/mash/verb/bitbake.py @@ -110,8 +110,10 @@ def main(self, *, context): # noqa: D102 self.path = os.path.abspath( os.path.join(os.getcwd(), str(pkg.path))) - self.build_base = os.path.abspath(os.path.join( - os.getcwd(), args.build_base, pkg.name)) + recipe_name = pkg.name.lower().replace('_', '-') + + recipe_dir = os.path.abspath(os.path.join( + os.getcwd(), args.build_base, recipe_name)) package_manifest_path = os.path.join(pkg.path, self.ros_package_manifest) if os.path.exists(package_manifest_path): @@ -191,10 +193,10 @@ def main(self, *, context): # noqa: D102 bitbake_recipe.set_git_metadata(src_uri, branch, src_rev, repo_name, tag_name) - ros_bitbake_recipe = os.path.join(self.build_base, bitbake_recipe.bitbake_recipe_filename()) + ros_bitbake_recipe = os.path.join(recipe_dir, bitbake_recipe.bitbake_recipe_filename()) lines.append(f"\t- Bitbake recipe: {ros_bitbake_recipe}") - os.makedirs(self.build_base, exist_ok=True) + os.makedirs(recipe_dir, exist_ok=True) with open(ros_bitbake_recipe, 'w') as h: h.write(bitbake_recipe.get_recipe_text())