diff mbox series

[1/3] bitbake-setup: fix top_dir creation in create_siteconf

Message ID 20251114-bitbake-setup-abort-v1-1-d2f9967df3b1@bootlin.com
State New
Headers show
Series bitbake-setup init improvements | expand

Commit Message

Antonin Godard Nov. 14, 2025, 11:07 a.m. UTC
The intent of the create_siteconf() is to create the site.conf file
common to all setups. For this it needs the top directory to be created.
Create the top directory instead of its parent.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Kanavin Nov. 14, 2025, 6:21 p.m. UTC | #1
On Fri, 14 Nov 2025 at 12:07, Antonin Godard via
lists.openembedded.org
<antonin.godard=bootlin.com@lists.openembedded.org> wrote:
> -        os.makedirs(os.path.dirname(top_dir), exist_ok=True)
> +        os.makedirs(top_dir, exist_ok=True)

Wait. What and where creates the top directory then, if writing the
site.conf still succeeds without this change?

Alex
Joshua Watt Nov. 14, 2025, 6:30 p.m. UTC | #2
On Fri, Nov 14, 2025 at 11:21 AM Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> On Fri, 14 Nov 2025 at 12:07, Antonin Godard via
> lists.openembedded.org
> <antonin.godard=bootlin.com@lists.openembedded.org> wrote:
> > -        os.makedirs(os.path.dirname(top_dir), exist_ok=True)
> > +        os.makedirs(top_dir, exist_ok=True)
>
> Wait. What and where creates the top directory then, if writing the
> site.conf still succeeds without this change?

I think the directory was being created by accident in init_bb_cache()

>
> Alex
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#18408): https://lists.openembedded.org/g/bitbake-devel/message/18408
> Mute This Topic: https://lists.openembedded.org/mt/116290012/3616693
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [JPEWhacker@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 5bbe3c0fce..6410504d4f 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -677,7 +677,7 @@  def create_siteconf(top_dir, non_interactive, settings):
             if y_or_n != 'y':
                 exit()
 
-        os.makedirs(os.path.dirname(top_dir), exist_ok=True)
+        os.makedirs(top_dir, exist_ok=True)
         with open(siteconfpath, 'w') as siteconffile:
             siteconffile.write(
                 textwrap.dedent(