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