mbox series

[RFC,0/7] bitbake-layers: Add update-layers-setup

Message ID 20231107152641.1043-2-jermain.horsman@nedap.com
Headers show
Series bitbake-layers: Add update-layers-setup | expand

Message

jhatnedap@gmail.com Nov. 7, 2023, 3:26 p.m. UTC
From: Jermain Horsman <jermain.horsman@nedap.com>

During development it can be useful to use a branch instead of a
revision, e.g. when rebasing often or just for easy upgrading of
the setup.

This is a first iteration, it updates the generation of the
setup-layers.json file as well as the json schema for it.
This allows for situations where one or more layers are checked out
using a branch instead of a revision, care is taken to make sure this
works when using multiple remotes.
All changes made are backwards compatible with older setup-layer json
files.

Previously the idea was to update bitbake-layers create-layers-setup and
extend it, I have however put it in a separate plugin as I think it makes
for a cleaner interface:

bitbake-layers update-layers-setup some.json poky [--branch]

I've opted to take the information from the currently checked out
repositories instead of allowing the user to specify the revision as this
eliminates the need to check if references are valid.

In previous discussions with Alex we talked about using any revisions,
e.g. tags as well, however, I have kept those out for simplicity.
Using tags complicates things as a reference can have multiple tags,
which would require additional parameters or potentially an interactive
solution.

I have not done a full oe-selftest run, so I may have missed a test, but
I believe the current selftests should pass on every commit.
I have extended oe-selftest with a simple case for the new functionality.

Jermain Horsman (7):
  scripts/oe-setup-layers: Allow setup using branches instead of fixed
    revisions
  lib/oe/buildcfg.py: Add additional git functions
  bitbake-layers: Add ability to update layer repository configuration
  bblayers/makesetup.py: Use new functions from oe.buildcfg
  lib/oe/buildcfg.py: Add additional git functions
  bitbake-layers: Add default remote to layers-setup.json
  bitbake-layers: Add test case update-layer-setup

 meta/files/layers.example.json                |  5 +-
 meta/files/layers.schema.json                 |  8 +-
 meta/lib/bblayers/makesetup.py                | 33 +++----
 .../bblayers/setupwriters/oe-setup-layers.py  |  2 +-
 meta/lib/bblayers/updatesetup.py              | 78 ++++++++++++++++
 meta/lib/oe/buildcfg.py                       | 45 +++++++++
 meta/lib/oeqa/selftest/cases/bblayers.py      | 58 ++++++++++--
 scripts/oe-setup-layers                       | 93 +++++++++++++++++--
 8 files changed, 282 insertions(+), 40 deletions(-)
 create mode 100644 meta/lib/bblayers/updatesetup.py