diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-29 14:56:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-04 11:16:43 +0100 |
commit | 19c4cf33f98f8d0a28313be4530a68169c4deb98 (patch) | |
tree | a85ffa6f4795ae9945ea0f5ed086d767b4d1e71e /bitbake | |
parent | b75bcc3b54e8956bfaf2dae9aa9bb9a5bbf82f00 (diff) | |
download | poky-19c4cf33f98f8d0a28313be4530a68169c4deb98.tar.gz |
bitbake: bitbake-setup: Improve the already initialized test
If the directory already exists but hasn't been setup, the current test
can fail so improve it.
(Bitbake rev: f8cc590403212886cc5ea19fe1e78dcd3438b612)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-setup | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 7067cbd4fc..ce5cd5e65f 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
@@ -393,7 +393,7 @@ def init_config(settings, args, d): | |||
393 | print("\nRun 'bitbake-setup init --non-interactive {}' to select this configuration non-interactively.\n".format(" ".join(upstream_config['non-interactive-cmdline-options']))) | 393 | print("\nRun 'bitbake-setup init --non-interactive {}' to select this configuration non-interactively.\n".format(" ".join(upstream_config['non-interactive-cmdline-options']))) |
394 | 394 | ||
395 | builddir = os.path.join(os.path.abspath(args.top_dir), args.build_dir_name or "{}-{}".format(upstream_config['name']," ".join(upstream_config['non-interactive-cmdline-options'][1:]).replace(" ","-").replace("/","_"))) | 395 | builddir = os.path.join(os.path.abspath(args.top_dir), args.build_dir_name or "{}-{}".format(upstream_config['name']," ".join(upstream_config['non-interactive-cmdline-options'][1:]).replace(" ","-").replace("/","_"))) |
396 | if os.path.exists(builddir): | 396 | if os.path.exists(os.path.join(builddir, "layers")): |
397 | print("Build already initialized in {}\nUse 'bitbake-setup status' to check if it needs to be updated or 'bitbake-setup update' to perform the update.".format(builddir)) | 397 | print("Build already initialized in {}\nUse 'bitbake-setup status' to check if it needs to be updated or 'bitbake-setup update' to perform the update.".format(builddir)) |
398 | return | 398 | return |
399 | 399 | ||
@@ -404,7 +404,7 @@ def init_config(settings, args, d): | |||
404 | exit() | 404 | exit() |
405 | print() | 405 | print() |
406 | 406 | ||
407 | os.makedirs(builddir) | 407 | os.makedirs(builddir, exist_ok=True) |
408 | 408 | ||
409 | confdir = os.path.join(builddir, "config") | 409 | confdir = os.path.join(builddir, "config") |
410 | layerdir = os.path.join(builddir, "layers") | 410 | layerdir = os.path.join(builddir, "layers") |