diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-02-10 07:42:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-15 10:21:34 +0000 |
commit | 4322056708873dd32bdad062079fecddaf538d9d (patch) | |
tree | 9e41ce54b8ac273a37a7ec66be9f741a9ea167be /scripts | |
parent | 314944eaaba2984b70af6be243b09cec566f6373 (diff) | |
download | poky-4322056708873dd32bdad062079fecddaf538d9d.tar.gz |
scripts/oe-setup-layers: print a note about submodules if present
(From OE-Core rev: 7f16c1c0229110c242f2e064d612d0d35823bf8d)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-setup-layers | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/oe-setup-layers b/scripts/oe-setup-layers index d0bc9f1667..461560de9f 100755 --- a/scripts/oe-setup-layers +++ b/scripts/oe-setup-layers | |||
@@ -46,6 +46,9 @@ def _is_layer_at_remote_uri(layerdir, remote, uri): | |||
46 | pass | 46 | pass |
47 | return False | 47 | return False |
48 | 48 | ||
49 | def _contains_submodules(layerdir): | ||
50 | return os.path.exists(os.path.join(layerdir,".gitmodules")) | ||
51 | |||
49 | def _do_checkout(args, json): | 52 | def _do_checkout(args, json): |
50 | layers = json['sources'] | 53 | layers = json['sources'] |
51 | for l_name in layers: | 54 | for l_name in layers: |
@@ -90,6 +93,9 @@ def _do_checkout(args, json): | |||
90 | print("Running '{}' in {}".format(cmd, layerdir)) | 93 | print("Running '{}' in {}".format(cmd, layerdir)) |
91 | subprocess.check_output(cmd, shell=True, cwd=layerdir) | 94 | subprocess.check_output(cmd, shell=True, cwd=layerdir) |
92 | 95 | ||
96 | if _contains_submodules(layerdir): | ||
97 | print("Repo {} contains submodules, use 'git submodule update' to ensure they are up to date".format(layerdir)) | ||
98 | |||
93 | parser = argparse.ArgumentParser(description="A self contained python script that fetches all the needed layers and sets them to correct revisions using data in a json format from a separate file. The json data can be created from an active build directory with 'bitbake-layers create-layers-setup destdir' and there's a sample file and a schema in meta/files/") | 99 | parser = argparse.ArgumentParser(description="A self contained python script that fetches all the needed layers and sets them to correct revisions using data in a json format from a separate file. The json data can be created from an active build directory with 'bitbake-layers create-layers-setup destdir' and there's a sample file and a schema in meta/files/") |
94 | 100 | ||
95 | parser.add_argument('--force-bootstraplayer-checkout', action='store_true', | 101 | parser.add_argument('--force-bootstraplayer-checkout', action='store_true', |