summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-09-01 20:37:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-02 15:58:26 +0100
commit2bdc042d9c782ce87c4bc70c4b04eacfaec549d4 (patch)
tree58a2ab1eeb66084c1991bcf5b83af542386ec82b
parentbfa02f71d86880781afb9e985b823c3add459162 (diff)
downloadpoky-2bdc042d9c782ce87c4bc70c4b04eacfaec549d4.tar.gz
meta/files/layers.schema.json: drop the layers property
This is a leftover from one of the RFC iterations, where the property contained available machines, distros and templates. As all of those were dropped from the final version, there is no reason to list the layers either anymore. Normally this would be a backwards incompatible change, but as the layer setup itself was just merged, I think we can do a quick fixup :-) (From OE-Core rev: 64a774de0e154ef81f20853fec903b17d9985a72) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/files/layers.example.json24
-rw-r--r--meta/files/layers.schema.json15
-rw-r--r--meta/lib/bblayers/makesetup.py3
-rwxr-xr-xscripts/oe-setup-layers10
4 files changed, 1 insertions, 51 deletions
diff --git a/meta/files/layers.example.json b/meta/files/layers.example.json
index 3772404ec9..0a6a6a7b48 100644
--- a/meta/files/layers.example.json
+++ b/meta/files/layers.example.json
@@ -12,11 +12,6 @@
12 }, 12 },
13 "rev": "05b25605fb8b2399e4706d7323828676bf0da0b5" 13 "rev": "05b25605fb8b2399e4706d7323828676bf0da0b5"
14 }, 14 },
15 "layers": {
16 "meta-alex": {
17 "subpath": ""
18 }
19 },
20 "path": "meta-alex" 15 "path": "meta-alex"
21 }, 16 },
22 "meta-intel": { 17 "meta-intel": {
@@ -30,11 +25,6 @@
30 }, 25 },
31 "rev": "0a96edae609a3f48befac36af82cf1eed6786b4a" 26 "rev": "0a96edae609a3f48befac36af82cf1eed6786b4a"
32 }, 27 },
33 "layers": {
34 "meta-intel": {
35 "subpath": ""
36 }
37 },
38 "path": "meta-intel" 28 "path": "meta-intel"
39 }, 29 },
40 "poky": { 30 "poky": {
@@ -51,20 +41,6 @@
51 }, 41 },
52 "rev": "9dda719b2a4727a4d43a6ab8d9e23f8ca68790ec" 42 "rev": "9dda719b2a4727a4d43a6ab8d9e23f8ca68790ec"
53 }, 43 },
54 "layers": {
55 "meta": {
56 "subpath": "meta"
57 },
58 "meta-poky": {
59 "subpath": "meta-poky"
60 },
61 "meta-selftest": {
62 "subpath": "meta-selftest"
63 },
64 "meta-yocto-bsp": {
65 "subpath": "meta-yocto-bsp"
66 }
67 },
68 "path": "poky" 44 "path": "poky"
69 } 45 }
70 }, 46 },
diff --git a/meta/files/layers.schema.json b/meta/files/layers.schema.json
index cd4ddd3dcd..659ee8da49 100644
--- a/meta/files/layers.schema.json
+++ b/meta/files/layers.schema.json
@@ -29,21 +29,6 @@
29 "description": "Whether the directory with the layer source also contains this json description. Tools may want to skip the checkout of the source then.", 29 "description": "Whether the directory with the layer source also contains this json description. Tools may want to skip the checkout of the source then.",
30 "type": "boolean" 30 "type": "boolean"
31 }, 31 },
32 "layers": {
33 "description": "The dict of layers to be used from this upstream source",
34 "type": "object",
35 "patternProperties": { ".*" : {
36 "description": "A layer from the upstream source",
37 "type": "object",
38 "additionalProperties": false,
39 "properties": {
40 "subpath": {
41 "description": "The subpath (relative to the source root) for this layer. Omit if the source root is the layer path",
42 "type": "string"
43 }
44 }
45 }}
46 },
47 "git-remote": { 32 "git-remote": {
48 "description": "A remote git source from which to fetch", 33 "description": "A remote git source from which to fetch",
49 "type": "object", 34 "type": "object",
diff --git a/meta/lib/bblayers/makesetup.py b/meta/lib/bblayers/makesetup.py
index bef6da0ea8..22f89d81a4 100644
--- a/meta/lib/bblayers/makesetup.py
+++ b/meta/lib/bblayers/makesetup.py
@@ -64,13 +64,12 @@ class MakeSetupPlugin(LayerPlugin):
64 return 64 return
65 repo_path = self._get_repo_path(l_path) 65 repo_path = self._get_repo_path(l_path)
66 if repo_path not in repos.keys(): 66 if repo_path not in repos.keys():
67 repos[repo_path] = {'path':os.path.basename(repo_path),'layers':{},'git-remote':{'rev':l_rev, 'branch':l_branch, 'remotes':self._get_remotes(repo_path), 'describe':self._get_describe(repo_path)}} 67 repos[repo_path] = {'path':os.path.basename(repo_path),'git-remote':{'rev':l_rev, 'branch':l_branch, 'remotes':self._get_remotes(repo_path), 'describe':self._get_describe(repo_path)}}
68 if repo_path == destdir_repo: 68 if repo_path == destdir_repo:
69 repos[repo_path]['contains_this_file'] = True 69 repos[repo_path]['contains_this_file'] = True
70 if not repos[repo_path]['git-remote']['remotes'] and not repos[repo_path]['contains_this_file']: 70 if not repos[repo_path]['git-remote']['remotes'] and not repos[repo_path]['contains_this_file']:
71 logger.error("Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=repo_path)) 71 logger.error("Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=repo_path))
72 return 72 return
73 repos[repo_path]['layers'][l_name] = {'subpath':l_path.replace(repo_path,'')[1:]}
74 73
75 top_path = os.path.commonpath([os.path.dirname(r) for r in repos.keys()]) 74 top_path = os.path.commonpath([os.path.dirname(r) for r in repos.keys()])
76 75
diff --git a/scripts/oe-setup-layers b/scripts/oe-setup-layers
index cbd2efb5c7..6ecaffed75 100755
--- a/scripts/oe-setup-layers
+++ b/scripts/oe-setup-layers
@@ -18,20 +18,10 @@ import subprocess
18 18
19def _do_checkout(args, json): 19def _do_checkout(args, json):
20 layers = json['sources'] 20 layers = json['sources']
21 buildconfs = []
22 oecorepath = ""
23 for l_name in layers: 21 for l_name in layers:
24 l_data = layers[l_name] 22 l_data = layers[l_name]
25 layerdir = os.path.abspath(os.path.join(args['destdir'], l_data['path'])) 23 layerdir = os.path.abspath(os.path.join(args['destdir'], l_data['path']))
26 24
27 for ll_name in l_data['layers']:
28 if ll_name == 'meta':
29 oecorepath = layerdir
30 ll_data = l_data['layers'][ll_name]
31 if 'buildconfigs' in ll_data:
32 for c in ll_data['buildconfigs']:
33 buildconfs.append(os.path.join(layerdir, ll_data['subpath'], c))
34
35 if 'contains_this_file' in l_data.keys(): 25 if 'contains_this_file' in l_data.keys():
36 force_arg = 'force_bootstraplayer_checkout' 26 force_arg = 'force_bootstraplayer_checkout'
37 if not args[force_arg]: 27 if not args[force_arg]: