add support to override refspec of repos

This patch adds the top-level `overrides` entry, which is used to
override (or pin) the refspec of repositories. The main difference to a
direct override is that this logic only applies to repos that are
already defined. By that, a superset of all repos can be added to this
entry (similar to a global lockfile), but only the currently active ones
are affected. A new top-level keyword is required because everything
below the "repos" keyword is potentially defined by "default" values.
For the locking mechanism, a clear separation between overrides (only
override if existing) and definitions is required to be able to define a
global lockfile with all possible repos, while just defining some repos.

Proposed-by: Ross Burton <ross@burtonini.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
[Jan: also bump __file_version__]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Felix Moessbauer
2023-04-23 11:42:25 +02:00
committed by Jan Kiszka
parent 6131038c00
commit 3e0dd10416
6 changed files with 51 additions and 5 deletions

View File

@@ -130,3 +130,11 @@ Added
- Variables used in the ``env`` section can now be assigned 'None' as value. In
this case the variables are only exported to the bb env whitelist.
Version 14
----------
Added
~~~~~
- The ``overrides`` top-level entry can be used to pin floating repo refspecs.

View File

@@ -455,6 +455,22 @@ Configuration reference
* ``path``: string [required]
The path to one patch file or a quilt formatted patchset directory.
* ``overrides``: dict [optional]
This object provides a mechanism to override kas configuration items
without defining them. By that, only items that already exist are
overridden. Note, that all entries below this key are reserved for
auto-generation using kas plugins. Do not manually add entries.
* ``repos``: dict [optional]
Mapps to the top-level ``repos`` entry.
* ``<repo-id>``: dict [optional]
Mapps to the ``<repo-id>`` entry.
* ``refspec``: string [optional]
Pinned refspec which overrides the ``refspec`` of the corresponding
repo. This refspec must be resolved (i.e. no branch or tag name).
* ``bblayers_conf_header``: dict [optional]
This contains strings that should be added to the ``bblayers.conf`` before
any layers are included.