From: Jermain Horsman <jermain.hors...@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]
  --use-custom-reference <repo>:<ref>
  <setup_dir>

Note: '--use-custom-reference <repo>:<ref>' 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, a possible extension would be to add an option
to update only selected repositories, this could be implemented later.

Changes in v3:
- Moved options from lib/bblayers/makesetup.py to
  lib/bblayers/setupwrites/oe-setup-layers.py.
- Split '--update REPOSITORY' in separate '--update' and '--repository
  REPOSITORY' options. Specifiying '--update' now selects the old setup
  config to be modified, without it an entirely new setup will be created
  and subsequently modified.
- Updated test case for the new options.

Changes in v4:
- Combined '--reference' and '--repository' options in
  '--use-custom-reference'.
- Updated option descriptions.
- Make all error reporting consistent.
- Updated test case.

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

 .../bblayers/setupwriters/oe-setup-layers.py  | 79 +++++++++++++++++--
 meta/lib/oeqa/selftest/cases/bblayers.py      | 53 +++++++++++++
 2 files changed, 125 insertions(+), 7 deletions(-)

-- 
2.42.0.windows.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193850): 
https://lists.openembedded.org/g/openembedded-core/message/193850
Mute This Topic: https://lists.openembedded.org/mt/103759483/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to