mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
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>
This commit is contained in:
@@ -393,7 +393,7 @@ def init_config(settings, args, d):
|
||||
print("\nRun 'bitbake-setup init --non-interactive {}' to select this configuration non-interactively.\n".format(" ".join(upstream_config['non-interactive-cmdline-options'])))
|
||||
|
||||
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("/","_")))
|
||||
if os.path.exists(builddir):
|
||||
if os.path.exists(os.path.join(builddir, "layers")):
|
||||
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))
|
||||
return
|
||||
|
||||
@@ -404,7 +404,7 @@ def init_config(settings, args, d):
|
||||
exit()
|
||||
print()
|
||||
|
||||
os.makedirs(builddir)
|
||||
os.makedirs(builddir, exist_ok=True)
|
||||
|
||||
confdir = os.path.join(builddir, "config")
|
||||
layerdir = os.path.join(builddir, "layers")
|
||||
|
||||
Reference in New Issue
Block a user