summaryrefslogtreecommitdiffstats
path: root/scripts/oe-setup-layers
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/oe-setup-layers')
-rwxr-xr-xscripts/oe-setup-layers10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/oe-setup-layers b/scripts/oe-setup-layers
index bee4ef0fec..6fbfefd656 100755
--- a/scripts/oe-setup-layers
+++ b/scripts/oe-setup-layers
@@ -63,6 +63,7 @@ def _write_layer_list(dest, repodirs):
63def _do_checkout(args, json): 63def _do_checkout(args, json):
64 repos = json['sources'] 64 repos = json['sources']
65 repodirs = [] 65 repodirs = []
66 oesetupbuild = None
66 for r_name in repos: 67 for r_name in repos:
67 r_data = repos[r_name] 68 r_data = repos[r_name]
68 repodir = os.path.abspath(os.path.join(args['destdir'], r_data['path'])) 69 repodir = os.path.abspath(os.path.join(args['destdir'], r_data['path']))
@@ -108,9 +109,18 @@ def _do_checkout(args, json):
108 109
109 if _contains_submodules(repodir): 110 if _contains_submodules(repodir):
110 print("Repo {} contains submodules, use 'git submodule update' to ensure they are up to date".format(repodir)) 111 print("Repo {} contains submodules, use 'git submodule update' to ensure they are up to date".format(repodir))
112 if os.path.exists(os.path.join(repodir, 'scripts/oe-setup-build')):
113 oesetupbuild = os.path.join(repodir, 'scripts/oe-setup-build')
111 114
112 _write_layer_list(args['destdir'], repodirs) 115 _write_layer_list(args['destdir'], repodirs)
113 116
117 if oesetupbuild:
118 oesetupbuild_symlink = os.path.join(args['destdir'], 'setup-build')
119 if os.path.exists(oesetupbuild_symlink):
120 os.remove(oesetupbuild_symlink)
121 os.symlink(os.path.relpath(oesetupbuild,args['destdir']),oesetupbuild_symlink)
122 print("\nRun '{}' to list available build configuration templates and set up a build from one of them.".format(oesetupbuild_symlink))
123
114parser = 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/") 124parser = 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/")
115 125
116parser.add_argument('--force-bootstraplayer-checkout', action='store_true', 126parser.add_argument('--force-bootstraplayer-checkout', action='store_true',