]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
bblayers/makesetup: include local repository paths in discovered layer repo data
authorAlexander Kanavin <alex@linutronix.de>
Tue, 7 May 2024 11:46:22 +0000 (13:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 May 2024 08:38:19 +0000 (09:38 +0100)
This can be useful when the caller needs to know where the repos actually
are on local disk (for example to make a local copy of them or obtain
additional information about them).

This field however should be removed from the json output in oe-setup-layers
plugin, as it is host-specific and not part of the schema.

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>
meta/lib/bblayers/makesetup.py
meta/lib/bblayers/setupwriters/oe-setup-layers.py

index 8148b0d9ff43c6f4c407cfa607ddcaef176a7df5..48dc73c288d914ca272e38955b73827081dce8f7 100644 (file)
@@ -76,6 +76,7 @@ class MakeSetupPlugin(LayerPlugin):
             repos_nopaths[r_nopath] = repos[r]
             r_relpath = os.path.relpath(r, top_path)
             repos_nopaths[r_nopath]['path'] = r_relpath
+            repos_nopaths[r_nopath]['originpath'] = r
         return repos_nopaths
 
     def do_make_setup(self, args):
index 59ca968ff33953a13edabd671b3b5573a4e35b72..56c929471e61ffecfa1661cc7796470d22d85cf8 100644 (file)
@@ -85,6 +85,8 @@ class OeSetupLayersWriter():
             if not os.path.exists(args.destdir):
                 os.makedirs(args.destdir)
             repos = parent.make_repo_config(args.destdir)
+            for r in repos.values():
+                del r['originpath']
             json = {"version":"1.0","sources":repos}
             if not repos:
                 err = "Could not determine layer sources"