[PATCH 0/2] Add more flexibility to overrides

8 views
Skip to first unread message

João Marcos Costa

unread,
Jun 11, 2026, 1:10:52 PM (8 days ago) Jun 11
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Hello,

This series is an effort to add more possibilities to overrides, namely to
handle the case when one needs to fetch the latest version of a branch - in a
CI, regularly tracking updates - which implies not using a fixed commit. In that
case, it is convenient to use overrides on top of the base configuration
file(s), and specially being able to remove the default commit from within the
override.

The first patch is not directly related to that use-case, by the way.

Best regards,

João Marcos Costa (2):
kas: allow overriding the url property
kas: schemas-kas.json: allow overrides to remove default commit

docs/format-changelog.rst | 8 ++++++++
kas/repos.py | 1 +
kas/schema-kas.json | 5 ++++-
3 files changed, 13 insertions(+), 1 deletion(-)

--
2.47.0

João Marcos Costa

unread,
Jun 11, 2026, 1:10:55 PM (8 days ago) Jun 11
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
As of now, only the branch and the commit can be overriden. However,
some use-cases can require a different URL to be used for fetching the
repositories (layers, bitbake, etc).

Add support for overriding 'url' thus improving flexibility, and
providing a way to handle cases like private (or public) mirrors.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
docs/format-changelog.rst | 8 ++++++++
kas/repos.py | 1 +
kas/schema-kas.json | 5 ++++-
3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
index b43b230..4756251 100644
--- a/docs/format-changelog.rst
+++ b/docs/format-changelog.rst
@@ -219,3 +219,11 @@ Added

- Switch to nodistro which is the default distro setting in
openembedded-core.
+
+Version 23
+----------
+
+Added
+~~~~~
+
+- The repo key ``url`` can now be overridden.
diff --git a/kas/repos.py b/kas/repos.py
index 498ca19..d2f233f 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -283,6 +283,7 @@ class Repo:
if refspec is None:
commit = repo_overrides.get('commit', commit)
branch = repo_overrides.get('branch', branch)
+ url = repo_overrides.get('url', url)
if commit and get_context().update:
logging.warning(f'Update of "{name}" requested, but repo is '
'pinned to a fixed commit. Not updating.')
diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index b8dc86c..cbba6ac 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -41,7 +41,7 @@
{
"type": "integer",
"minimum": 1,
- "maximum": 22
+ "maximum": 23
}
]
},
@@ -140,6 +140,9 @@
},
"commit": {
"type": "string"
+ },
+ "url": {
+ "type": "string"
}
}
}
--
2.47.0

João Marcos Costa

unread,
Jun 11, 2026, 1:11:00 PM (8 days ago) Jun 11
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Currently there is no way to remove a default commit coming from the
"base" configuration. This makes it impossible to stick with the HEAD of
a branch (e.g. for testing purposes, always fetching the latest
revision), since the update will not be performed if a commit is already
defined:

WARNING - Update of "meta-security" requested, but repo is pinned to a fixed commit. Not updating.

While one could override the commit to use a branch name, this is not
how this property should be used according to the docs.

The idea of this change is to support the use-case below (or similar):

overrides:
oe-core:
# commit: "origin/master-next" <- dirty (and discouraged) workaround
branch : "master-next"
commit: null

Allow it by supporting the nulltype value null as a valid value for
commit, inside overrides.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
kas/schema-kas.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index cbba6ac..ca082ef 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -139,7 +139,7 @@
"type": ["string", "null"]
},
"commit": {
- "type": "string"
+ "type": ["string", "null"]
},
"url": {
"type": "string"
--
2.47.0

Jan Kiszka

unread,
Jun 12, 2026, 8:14:58 AM (7 days ago) Jun 12
to João Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
Please rebase over next.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Jan Kiszka

unread,
Jun 12, 2026, 8:15:19 AM (7 days ago) Jun 12
to João Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
On 11.06.26 19:10, 'João Marcos Costa' via kas-devel wrote:
Nice if only a schema change is needed for a new feature, and no code
chances. :) But please describe this in format-changelog.rst as well.

João Marcos Costa

unread,
Jun 15, 2026, 4:39:03 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Hello,

This series is an effort to add more possibilities to overrides, namely to
handle the case when one needs to fetch the latest version of a branch - in a
CI, regularly tracking updates - which implies not using a fixed commit. In that
case, it is convenient to use overrides on top of the base configuration
file(s), and specially being able to remove the default commit from within the
override.

The first patch is not directly related to that use-case, by the way.

Best regards,

Changes in v2:
- rebased on top of latest 'next'
- document the second patch in format-changelog.rst

João Marcos Costa (2):
kas: allow overriding the url property
kas: schemas-kas.json: allow overrides to remove default

docs/format-changelog.rst | 17 +++++++++++++++++
kas/schema-kas.json | 5 ++++-
2 files changed, 21 insertions(+), 1 deletion(-)

--
2.47.0

João Marcos Costa

unread,
Jun 15, 2026, 4:39:07 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
As of now, only the branch and the commit can be overriden. However,
some use-cases can require a different URL to be used for fetching the
repositories (layers, bitbake, etc).

Add support for overriding 'url' thus improving flexibility, and
providing a way to handle cases like private (or public) mirrors.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
docs/format-changelog.rst | 8 ++++++++
kas/schema-kas.json | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
index fb8f4f8..c332d9e 100644
--- a/docs/format-changelog.rst
+++ b/docs/format-changelog.rst
@@ -228,3 +228,11 @@ Added

- Extend the allowed values of ``build_system`` by adding ``isar-privileged``
and ``isar-rootless``.
+
+Version 24
+----------
+
+Added
+~~~~~
+
+- The repo key ``url`` can now be overridden.
diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index 923a106..33fb863 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -41,7 +41,7 @@
{
"type": "integer",
"minimum": 1,
- "maximum": 23
+ "maximum": 24
}
]
},
@@ -142,6 +142,9 @@
},
"commit": {
"type": "string"
+ },
+ "url": {
+ "type": "string"
}
}
}
--
2.47.0

João Marcos Costa

unread,
Jun 15, 2026, 4:39:10 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Currently there is no way to remove a default commit coming from the
"base" configuration. This makes it impossible to stick with the HEAD of
a branch (e.g. for testing purposes, always fetching the latest
revision), since the update will not be performed if a commit is already
defined:

WARNING - Update of "meta-security" requested, but repo is pinned to a fixed commit. Not updating.

While one could override the commit to use a branch name, this is not
how this property should be used according to the docs.

The idea of this change is to support the use-case below (or similar):

overrides:
oe-core:
# commit: "origin/master-next" <- dirty (and discouraged) workaround
branch : "master-next"
commit: null

Allow it by supporting the nulltype value null as a valid value for
commit, inside overrides.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
docs/format-changelog.rst | 9 +++++++++
kas/schema-kas.json | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
index c332d9e..a31a121 100644
--- a/docs/format-changelog.rst
+++ b/docs/format-changelog.rst
@@ -236,3 +236,12 @@ Added
~~~~~

- The repo key ``url`` can now be overridden.
+
+Version 25
+----------
+
+Added
+~~~~~
+
+- The repo key ``commit`` can now be overriden with a null-value in such a way
+ that the head of a given branch is used instead of the commit's default value.
diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index 33fb863..0ad93d3 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -141,7 +141,7 @@
"type": ["string", "null"]
},
"commit": {
- "type": "string"
+ "type": ["string", "null"]
},
"url": {
"type": "string"
--
2.47.0

Jan Kiszka

unread,
Jun 15, 2026, 5:10:30 AM (4 days ago) Jun 15
to João Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
On 15.06.26 10:38, 'João Marcos Costa' via kas-devel wrote:
> As of now, only the branch and the commit can be overriden. However,
> some use-cases can require a different URL to be used for fetching the
> repositories (layers, bitbake, etc).
>
> Add support for overriding 'url' thus improving flexibility, and
> providing a way to handle cases like private (or public) mirrors.
>
> Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
> ---
> docs/format-changelog.rst | 8 ++++++++
> kas/schema-kas.json | 5 ++++-
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
> index fb8f4f8..c332d9e 100644
> --- a/docs/format-changelog.rst
> +++ b/docs/format-changelog.rst
> @@ -228,3 +228,11 @@ Added
>
> - Extend the allowed values of ``build_system`` by adding ``isar-privileged``
> and ``isar-rootless``.
> +
> +Version 24
> +----------

23 hasn't been released yet, just add this to it.

Jan

> +
> +Added
> +~~~~~
> +
> +- The repo key ``url`` can now be overridden.
> diff --git a/kas/schema-kas.json b/kas/schema-kas.json
> index 923a106..33fb863 100644
> --- a/kas/schema-kas.json
> +++ b/kas/schema-kas.json
> @@ -41,7 +41,7 @@
> {
> "type": "integer",
> "minimum": 1,
> - "maximum": 23
> + "maximum": 24
> }
> ]
> },
> @@ -142,6 +142,9 @@
> },
> "commit": {
> "type": "string"
> + },
> + "url": {
> + "type": "string"
> }
> }
> }


--

Jan Kiszka

unread,
Jun 15, 2026, 5:11:33 AM (4 days ago) Jun 15
to João Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
On 15.06.26 10:38, 'João Marcos Costa' via kas-devel wrote:
Same here: We only freeze the version on kas releases. Before that, you
can add as many changes as you like to the same one.

Jan

> +Added
> +~~~~~
> +
> +- The repo key ``commit`` can now be overriden with a null-value in such a way
> + that the head of a given branch is used instead of the commit's default value.
> diff --git a/kas/schema-kas.json b/kas/schema-kas.json
> index 33fb863..0ad93d3 100644
> --- a/kas/schema-kas.json
> +++ b/kas/schema-kas.json
> @@ -141,7 +141,7 @@
> "type": ["string", "null"]
> },
> "commit": {
> - "type": "string"
> + "type": ["string", "null"]
> },
> "url": {
> "type": "string"

--

João Marcos Costa

unread,
Jun 15, 2026, 5:27:23 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Hello,

This series is an effort to add more possibilities to overrides, namely to
handle the case when one needs to fetch the latest version of a branch - in a
CI, regularly tracking updates - which implies not using a fixed commit. In that
case, it is convenient to use overrides on top of the base configuration
file(s), and specially being able to remove the default commit from within the
override.

The first patch is not directly related to that use-case, by the way.

Best regards,

Changes in v3:
- added all of the changes to version 23 in format-changelog.rst

João Marcos Costa (2):
kas: allow overriding the url property
kas: schemas-kas.json: allow overrides to remove default

docs/format-changelog.rst | 3 +++
kas/repos.py | 1 +
kas/schema-kas.json | 3 +++
3 files changed, 7 insertions(+)

--
2.47.0

João Marcos Costa

unread,
Jun 15, 2026, 5:27:25 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
As of now, only the branch and the commit can be overriden. However,
some use-cases can require a different URL to be used for fetching the
repositories (layers, bitbake, etc).

Add support for overriding 'url' thus improving flexibility, and
providing a way to handle cases like private (or public) mirrors.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
docs/format-changelog.rst | 1 +
kas/repos.py | 1 +
kas/schema-kas.json | 3 +++
3 files changed, 5 insertions(+)

diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
index fb8f4f8..ae9b387 100644
--- a/docs/format-changelog.rst
+++ b/docs/format-changelog.rst
@@ -228,3 +228,4 @@ Added

- Extend the allowed values of ``build_system`` by adding ``isar-privileged``
and ``isar-rootless``.
+- The repo key ``url`` can now be overridden.
diff --git a/kas/repos.py b/kas/repos.py
index 498ca19..d2f233f 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -283,6 +283,7 @@ class Repo:
if refspec is None:
commit = repo_overrides.get('commit', commit)
branch = repo_overrides.get('branch', branch)
+ url = repo_overrides.get('url', url)
if commit and get_context().update:
logging.warning(f'Update of "{name}" requested, but repo is '
'pinned to a fixed commit. Not updating.')
diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index 923a106..e9bd479 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -142,6 +142,9 @@
},
"commit": {
"type": "string"
+ },
+ "url": {
+ "type": "string"
}
}
}
--
2.47.0

João Marcos Costa

unread,
Jun 15, 2026, 5:27:36 AM (4 days ago) Jun 15
to kas-...@googlegroups.com, thomas.p...@bootlin.com, João Marcos Costa
Currently there is no way to remove a default commit coming from the
"base" configuration. This makes it impossible to stick with the HEAD of
a branch (e.g. for testing purposes, always fetching the latest
revision), since the update will not be performed if a commit is already
defined:

WARNING - Update of "meta-security" requested, but repo is pinned to a fixed commit. Not updating.

While one could override the commit to use a branch name, this is not
how this property should be used according to the docs.

The idea of this change is to support the use-case below (or similar):

overrides:
oe-core:
# commit: "origin/master-next" <- dirty (and discouraged) workaround
branch : "master-next"
commit: null

Allow it by supporting the nulltype value null as a valid value for
commit, inside overrides.

Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarc...@bootlin.com>
---
docs/format-changelog.rst | 2 ++
kas/schema-kas.json | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst
index ae9b387..2706e0a 100644
--- a/docs/format-changelog.rst
+++ b/docs/format-changelog.rst
@@ -229,3 +229,5 @@ Added
- Extend the allowed values of ``build_system`` by adding ``isar-privileged``
and ``isar-rootless``.
- The repo key ``url`` can now be overridden.
+- The repo key ``commit`` can now be overriden with a null-value in such a way
+ that the head of a given branch is used instead of the commit's default value.
diff --git a/kas/schema-kas.json b/kas/schema-kas.json
index e9bd479..a35e83b 100644
--- a/kas/schema-kas.json
+++ b/kas/schema-kas.json
@@ -141,7 +141,7 @@
"type": ["string", "null"]
},
"commit": {
- "type": "string"
+ "type": ["string", "null"]
},
"url": {
"type": "string"
--
2.47.0

Joao Marcos Costa

unread,
Jun 15, 2026, 5:28:49 AM (4 days ago) Jun 15
to Jan Kiszka, kas-...@googlegroups.com, thomas.p...@bootlin.com
Hello, Jan

> Same here: We only freeze the version on kas releases. Before that, you
> can add as many changes as you like to the same one.
>
> Jan

Done. I hope it's correct now.

--

Joao Marcos Costa

unread,
Jun 15, 2026, 5:31:43 AM (4 days ago) Jun 15
to Jan Kiszka, kas-...@googlegroups.com, thomas.p...@bootlin.com
Hello,

On 6/12/26 14:15, Jan Kiszka wrote:

> Nice if only a schema change is needed for a new feature, and no code
> chances. :)

Credits go to kas! Simple code, simple changes I think.

--

Jan Kiszka

unread,
Jun 15, 2026, 5:43:48 AM (4 days ago) Jun 15
to João Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
Thanks, both applied.

Just one minor formatting note: This list (like several others) is
rewriting the sender address to "'João Marcos Costa' via kas-devel
<kas-...@googlegroups.com>". My patch tooling detects this, and I
aligned author to signer. You can avoid that by adding a "From:" line to
the top of the commit message -> git format-patch --force-in-body-from.

Jan

Joao Marcos Costa

unread,
Jun 15, 2026, 5:53:55 AM (4 days ago) Jun 15
to Jan Kiszka, kas-...@googlegroups.com, thomas.p...@bootlin.com
Hello,
Noted. Thanks for this heads up and for the quick review as well!

Jan Kiszka

unread,
Jun 15, 2026, 6:20:50 AM (4 days ago) Jun 15
to Joao Marcos Costa, kas-...@googlegroups.com, thomas.p...@bootlin.com
There was also a checkcode.sh complaint, already fixed. I tend to forget
running that script locally before push as well - CI makes you lazy.
Reply all
Reply to author
Forward
0 new messages