diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-31 13:13:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-01 10:07:02 +0100 |
commit | e561fc1cbec02b4002e33c63281e63691d4a2725 (patch) | |
tree | cee69a1004baee92628c243cc29ef6acf08dc9e2 /scripts | |
parent | f5d6792d68a12db9c512522ef576b5a8d4204952 (diff) | |
download | poky-e561fc1cbec02b4002e33c63281e63691d4a2725.tar.gz |
bitbake-layers: add ability to save current layer repository configuration into a file
This addresses a long standing gap in the core offering:
there is no tooling to capture the currently configured layers
with their revisions, or restore the layers from a configuration
file (without using external tools, some of which aren't particularly
suitable for the task). This plugin addresses the 'capture' part.
Note that the actual writing is performed by a sub-plugin; one such
sub-plugin is provided (for the json + python script format), but
more can be added (e.g. kas, repo, etc.).
How to save a layer configuration:
a) Running with default choices:
$ bitbake-layers create-layers-setup /srv/work/alex/meta-alex/
NOTE: Starting bitbake server...
NOTE: Created /srv/work/alex/meta-alex/setup-layers.json
NOTE: Created /srv/work/alex/meta-alex/setup-layers
b) Command line options:
NOTE: Starting bitbake server...
usage: bitbake-layers create-layers-setup [-h] [--output-prefix OUTPUT_PREFIX] [--writer {oe-setup-layers}] [--json-only] destdir
Writes out a configuration file and/or a script that replicate the directory structure and revisions of the layers in a current build.
positional arguments:
destdir Directory where to write the output
(if it is inside one of the layers, the layer becomes a bootstrap repository and thus will be excluded from fetching).
optional arguments:
-h, --help show this help message and exit
--output-prefix OUTPUT_PREFIX, -o OUTPUT_PREFIX
File name prefix for the output files, if the default (setup-layers) is undesirable.
--writer {oe-setup-layers}, -w {oe-setup-layers}
Choose the output format (defaults to oe-setup-layers).
Currently supported options are:
oe-setup-layers - a self-contained python script and a json config for it.
--json-only When using the oe-setup-layers writer, write only the layer configuruation in json format. Otherwise, also a copy of scripts/oe-setup-layers (from oe-core or poky) is provided, which is a self contained python script that fetches all the needed layers and sets them to correct revisions using the data from the json.
(From OE-Core rev: 5606d1a123a3816ab45e49ee7707ed84c9c23c5c)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions