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-14 11:24:57 +0100 |
| commit | dd358f75f4b99f5ed18d9349713970c7d1a9646f (patch) | |
| tree | 98e79c63f002b33770ea1253f60e1037a7c90b4b | |
| parent | 3d48b2a7b189b20a83e0b3098cab42540f5d050f (diff) | |
| download | poky-dd358f75f4b99f5ed18d9349713970c7d1a9646f.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: dac27bd5acbde1807b9637f809fd0ee5bf424286)
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") |
