mbox series

[RFC,v2,0/2] bitbake-layers: Add possibility to update layers setup

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

Message

jhatnedap@gmail.com Jan. 4, 2024, 12:33 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 iteration has a very minimal implementation, which covers many
use cases, but certainly not all.

As previously discussed the interface is as follows:

bitbake-layers create-layers-setup
  --update <repo>
  --reference <ref>
  <setup_dir>

Note: '--update <repo>' can be used multiple times

Based on previous discussions, this implementation does not check
any input and it is left to the user to make sure that provided
references are actually valid for use by git.

Valid references are git hashes, tags and branch names, there are a
few things that should be noted:
- On systems without a default branch, using a branch name that is
  known to multiple remotes will fail.
- Using a branch name without remote will work, however after the
  initial checkout this branch is never changed as no pull is
  performed.
- The layers setup will be created successfully even if the reference
  is not valid.

Another thing to note, currently a reference is required, a possible
extension would be to make this optional and e.g. make this update
only the selected repositories, this could be implemented later.

Jermain Horsman (2):
  bitbake-layers: Add ability to update the reference of repositories
  bitbake-layers: Add test case layers setup update

 meta/lib/bblayers/makesetup.py                | 11 +++++
 .../bblayers/setupwriters/oe-setup-layers.py  | 43 ++++++++++++++++---
 meta/lib/oeqa/selftest/cases/bblayers.py      | 26 +++++++++++
 3 files changed, 73 insertions(+), 7 deletions(-)