Signed-off-by: Alexander Kanavin <a...@linutronix.de>
---
 scripts/oe-setup-layers | 6 ++++++
 1 file changed, 6 insertions(+)

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):
         pass
     return False
 
+def _contains_submodules(layerdir):
+    return os.path.exists(os.path.join(layerdir,".gitmodules"))
+
 def _do_checkout(args, json):
     layers = json['sources']
     for l_name in layers:
@@ -90,6 +93,9 @@ def _do_checkout(args, json):
             print("Running '{}' in {}".format(cmd, layerdir))
             subprocess.check_output(cmd, shell=True, cwd=layerdir)
 
+            if _contains_submodules(layerdir):
+                print("Repo {} contains submodules, use 'git submodule update' 
to ensure they are up to date".format(layerdir))
+
 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/")
 
 parser.add_argument('--force-bootstraplayer-checkout', action='store_true',
-- 
2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176977): 
https://lists.openembedded.org/g/openembedded-core/message/176977
Mute This Topic: https://lists.openembedded.org/mt/96871665/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to