diff options
author | Alexander Kanavin <alex@linutronix.de> | 2024-05-07 13:46:23 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-28 09:38:22 +0100 |
commit | 11762e4dc3ce98d50b1f44832482bcc83c4da621 (patch) | |
tree | 7c228f10edd1eb062f4fde590fbf942c6c591590 /meta/lib/bblayers/setupwriters/oe-setup-layers.py | |
parent | 8332fd532f73198cc44c471aef0cdfb945b04431 (diff) | |
download | poky-11762e4dc3ce98d50b1f44832482bcc83c4da621.tar.gz |
bblayers/makesetup: move check for existence of git remotes to oe-setup-layers plugin
This helps when making a local copy of all the layers: it's fine to
not have any remotes configured in that case.
Also correct the mistake in accessing 'contains_this_file' property:
it may not necessarily exist, and if so, it should default to False.
(From OE-Core rev: 639df31e57b7f3da2d475cbae9a79d45755dede6)
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>
Diffstat (limited to 'meta/lib/bblayers/setupwriters/oe-setup-layers.py')
-rw-r--r-- | meta/lib/bblayers/setupwriters/oe-setup-layers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/bblayers/setupwriters/oe-setup-layers.py b/meta/lib/bblayers/setupwriters/oe-setup-layers.py index 56c929471e..8faeabfabc 100644 --- a/meta/lib/bblayers/setupwriters/oe-setup-layers.py +++ b/meta/lib/bblayers/setupwriters/oe-setup-layers.py | |||
@@ -86,6 +86,9 @@ class OeSetupLayersWriter(): | |||
86 | os.makedirs(args.destdir) | 86 | os.makedirs(args.destdir) |
87 | repos = parent.make_repo_config(args.destdir) | 87 | repos = parent.make_repo_config(args.destdir) |
88 | for r in repos.values(): | 88 | for r in repos.values(): |
89 | if not r['git-remote']['remotes'] and not r.get('contains_this_file', False): | ||
90 | e = "Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=r['originpath']) | ||
91 | raise Exception(e) | ||
89 | del r['originpath'] | 92 | del r['originpath'] |
90 | json = {"version":"1.0","sources":repos} | 93 | json = {"version":"1.0","sources":repos} |
91 | if not repos: | 94 | if not repos: |