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 21:33:32 +0100 |
| commit | 97e86e6b2b123a081ba8683576cff72c6149d6db (patch) | |
| tree | a85ffa6f4795ae9945ea0f5ed086d767b4d1e71e | |
| parent | 948b9c675c1f9804a26683ebf31aaf8caae34ea4 (diff) | |
| download | poky-97e86e6b2b123a081ba8683576cff72c6149d6db.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>
| -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") |
