summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@siemens.com>2023-02-10 07:42:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 10:21:34 +0000
commitac60e31af37c2297c679d67d22e5bcad28ead450 (patch)
tree5c84cd25034b724ea53b9940dcedc6bb2ce07587
parent7f6a17a19c169d091f6ca35490df61491cc1e52f (diff)
downloadpoky-ac60e31af37c2297c679d67d22e5bcad28ead450.tar.gz
bblayers/setupwriters/oe-setup-layers: create dir if not exists
Without this patch: $ bitbake-layers create-layers-setup /home/adrian/temp/poky-clone NOTE: Starting bitbake server... Traceback (most recent call last): File "/home/adrian/projects/poky/bitbake/lib/bb/process.py", line 169, in run pipe = Popen(cmd, **options) File "/home/adrian/projects/poky/bitbake/lib/bb/process.py", line 73, in __init__ subprocess.Popen.__init__(self, *args, **options) File "/usr/lib64/python3.10/subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib64/python3.10/subprocess.py", line 1847, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/home/adrian/temp/poky-clone' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/adrian/projects/poky/bitbake/bin/bitbake-layers", line 95, in <module> ret = main() File "/home/adrian/projects/poky/bitbake/bin/bitbake-layers", line 88, in main return args.func(args) File "/home/adrian/projects/poky/meta/lib/bblayers/makesetup.py", line 90, in do_make_setup p.do_write(self, args) File "/home/adrian/projects/poky/meta/lib/bblayers/setupwriters/oe-setup-layers.py", line 36, in do_write repos = parent.make_repo_config(args.destdir, args.include_layer_repo) File "/home/adrian/projects/poky/meta/lib/bblayers/makesetup.py", line 55, in make_repo_config destdir_repo = self._get_repo_path(destdir) File "/home/adrian/projects/poky/meta/lib/bblayers/makesetup.py", line 30, in _get_repo_path repo_path, _ = bb.process.run('git rev-parse --show-toplevel', cwd=layer_path) File "/home/adrian/projects/poky/bitbake/lib/bb/process.py", line 172, in run raise NotFoundError(cmd) bb.process.NotFoundError: Execution of 'git rev-parse --show-toplevel' failed: command not found with this patch: $ bitbake-layers create-layers-setup /home/adrian/temp/poky-clone NOTE: Starting bitbake server... NOTE: Created /home/adrian/temp/poky-clone/setup-layers.json NOTE: Created /home/adrian/temp/poky-clone/setup-layers (From OE-Core rev: 2da12ccada46443d58dd8fab463156fa763b84cc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/bblayers/setupwriters/oe-setup-layers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/bblayers/setupwriters/oe-setup-layers.py b/meta/lib/bblayers/setupwriters/oe-setup-layers.py
index f6a484b766..d5bc19a8cb 100644
--- a/meta/lib/bblayers/setupwriters/oe-setup-layers.py
+++ b/meta/lib/bblayers/setupwriters/oe-setup-layers.py
@@ -33,6 +33,8 @@ class OeSetupLayersWriter():
33 33
34 def do_write(self, parent, args): 34 def do_write(self, parent, args):
35 """ Writes out a python script and a json config that replicate the directory structure and revisions of the layers in a current build. """ 35 """ Writes out a python script and a json config that replicate the directory structure and revisions of the layers in a current build. """
36 if not os.path.exists(args.destdir):
37 os.makedirs(args.destdir)
36 repos = parent.make_repo_config(args.destdir) 38 repos = parent.make_repo_config(args.destdir)
37 json = {"version":"1.0","sources":repos} 39 json = {"version":"1.0","sources":repos}
38 if not repos: 40 if not repos: