* [PATCH v5 1/4] bitbake-setup: add inline URI
@ 2025-12-23 10:17 Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 2/4] layers.schema.json: support 'uri' Corentin Guillevic
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Corentin Guillevic @ 2025-12-23 10:17 UTC (permalink / raw)
To: bitbake-devel; +Cc: Corentin Guillevic
Most of the time, when we describe a remote, a bitbake-setup source looks like this:
"bitbake": {
"git-remote": {
"remotes": {
"origin": {
"uri": "https://git.openembedded.org/bitbake"
}
},
...
}
}
i.e. an URI with the common name 'origin'. Alternatively, we could simplify this, by
using a shorter structure with the property 'uri' only:
"bitbake": {
"git-remote": {
"uri": "https://git.openembedded.org/bitbake",
...
}
}
These properties can be used together.
Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
---
Changes in v5:
- Fix variable mistake in are_layers_changed() function
bin/bitbake-setup | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 73f734e73..d868d8a11 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -89,14 +89,30 @@ def _write_layer_list(dest, repodirs):
with open(layers_f, 'w') as f:
json.dump({"version":"1.0","layers":layers}, f, sort_keys=True, indent=4)
+def _get_remotes(r_remote):
+ remotes = []
+
+ if not 'remotes' in r_remote and not 'uri' in r_remote:
+ raise Exception("Expected key(s): 'remotes', 'uri'")
+
+ if 'remotes' in r_remote:
+ for remote in r_remote['remotes']:
+ remotes.append(r_remote['remotes'][remote]['uri'])
+
+ if 'uri' in r_remote:
+ remotes.append(r_remote['uri'])
+
+ return remotes
+
def checkout_layers(layers, layerdir, d):
def _checkout_git_remote(r_remote, repodir, layers_fixed_revisions):
rev = r_remote['rev']
branch = r_remote.get('branch', None)
- remotes = r_remote['remotes']
+
+ remotes = _get_remotes(r_remote)
for remote in remotes:
- prot,host,path,user,pswd,params = bb.fetch.decodeurl(remotes[remote]["uri"])
+ prot,host,path,user,pswd,params = bb.fetch.decodeurl(remote)
fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params))
logger.plain(" {}".format(r_name))
if branch:
@@ -600,10 +616,11 @@ def are_layers_changed(layers, layerdir, d):
changed = False
rev = r_remote['rev']
branch = r_remote.get('branch', None)
- remotes = r_remote['remotes']
+
+ remotes = _get_remotes(r_remote)
for remote in remotes:
- type,host,path,user,pswd,params = bb.fetch.decodeurl(remotes[remote]["uri"])
+ type,host,path,user,pswd,params = bb.fetch.decodeurl(remote)
fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params))
if branch:
fetcher = bb.fetch.FetchData("{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir), d)
@@ -614,7 +631,7 @@ def are_layers_changed(layers, layerdir, d):
local_revision = rev_parse_result[0].strip()
if upstream_revision != local_revision:
changed = True
- logger.info('Layer repository {} checked out into {} updated revision {} from {} to {}'.format(remotes[remote]["uri"], os.path.join(layerdir, repodir), rev, local_revision, upstream_revision))
+ logger.info('Layer repository {} checked out into {} updated revision {} from {} to {}'.format(remote, os.path.join(layerdir, repodir), rev, local_revision, upstream_revision))
return changed
changed = False
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 2/4] layers.schema.json: support 'uri'
2025-12-23 10:17 [PATCH v5 1/4] bitbake-setup: add inline URI Corentin Guillevic
@ 2025-12-23 10:17 ` Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 4/4] doc/bitbake-setup: document "uri" property Corentin Guillevic
2 siblings, 0 replies; 6+ messages in thread
From: Corentin Guillevic @ 2025-12-23 10:17 UTC (permalink / raw)
To: bitbake-devel; +Cc: Corentin Guillevic
The property 'uri', which is a shortcut for 'remotes/origin/uri', is now
supported under 'git-remote'.
Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
---
setup-schema/layers.schema.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/setup-schema/layers.schema.json b/setup-schema/layers.schema.json
index 1a0255435..f42606941 100644
--- a/setup-schema/layers.schema.json
+++ b/setup-schema/layers.schema.json
@@ -46,6 +46,10 @@
"description": "The output of 'git describe' (human readable description of the revision using tags in revision history).",
"type": "string"
},
+ "uri": {
+ "description": "Specifies the git URI, can be used instead of the more elaborate 'remotes' property when there is only a single URI",
+ "type": "string"
+ },
"remotes": {
"description": "The dict of git remotes to add to this repository",
"type": "object",
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations
2025-12-23 10:17 [PATCH v5 1/4] bitbake-setup: add inline URI Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 2/4] layers.schema.json: support 'uri' Corentin Guillevic
@ 2025-12-23 10:17 ` Corentin Guillevic
2026-01-09 13:41 ` [bitbake-devel] " Alexander Kanavin
2025-12-23 10:17 ` [PATCH v5 4/4] doc/bitbake-setup: document "uri" property Corentin Guillevic
2 siblings, 1 reply; 6+ messages in thread
From: Corentin Guillevic @ 2025-12-23 10:17 UTC (permalink / raw)
To: bitbake-devel; +Cc: Corentin Guillevic
Currently, no source has several remotes. So we can replace their entire
structure 'remote' -> 'origin' -> 'uri' with a shorter one (property 'uri'
only).
Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
---
.../oe-nodistro-master.conf.json | 18 +++-----------
.../oe-nodistro-whinlatter.conf.json | 18 +++-----------
.../configurations/poky-master.conf.json | 24 ++++---------------
.../configurations/poky-whinlatter.conf.json | 24 ++++---------------
4 files changed, 14 insertions(+), 70 deletions(-)
diff --git a/default-registry/configurations/oe-nodistro-master.conf.json b/default-registry/configurations/oe-nodistro-master.conf.json
index 180d2008a..e4e842177 100644
--- a/default-registry/configurations/oe-nodistro-master.conf.json
+++ b/default-registry/configurations/oe-nodistro-master.conf.json
@@ -3,33 +3,21 @@
"sources": {
"bitbake": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/bitbake"
- }
- },
+ "uri": "https://git.openembedded.org/bitbake",
"branch": "master",
"rev": "master"
}
},
"openembedded-core": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/openembedded-core"
- }
- },
+ "uri": "https://git.openembedded.org/openembedded-core",
"branch": "master",
"rev": "master"
}
},
"yocto-docs": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/yocto-docs"
- }
- },
+ "uri": "https://git.yoctoproject.org/yocto-docs",
"branch": "master",
"rev": "master"
}
diff --git a/default-registry/configurations/oe-nodistro-whinlatter.conf.json b/default-registry/configurations/oe-nodistro-whinlatter.conf.json
index 7b183ae1c..8342f2cf5 100644
--- a/default-registry/configurations/oe-nodistro-whinlatter.conf.json
+++ b/default-registry/configurations/oe-nodistro-whinlatter.conf.json
@@ -4,33 +4,21 @@
"sources": {
"bitbake": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/bitbake"
- }
- },
+ "uri": "https://git.openembedded.org/bitbake",
"branch": "2.16",
"rev": "2.16"
}
},
"openembedded-core": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/openembedded-core"
- }
- },
+ "uri": "https://git.openembedded.org/openembedded-core",
"branch": "whinlatter",
"rev": "whinlatter"
}
},
"yocto-docs": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/yocto-docs"
- }
- },
+ "uri": "https://git.yoctoproject.org/yocto-docs",
"branch": "whinlatter",
"rev": "whinlatter"
}
diff --git a/default-registry/configurations/poky-master.conf.json b/default-registry/configurations/poky-master.conf.json
index 1de038bab..82464e8ab 100644
--- a/default-registry/configurations/poky-master.conf.json
+++ b/default-registry/configurations/poky-master.conf.json
@@ -3,44 +3,28 @@
"sources": {
"bitbake": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/bitbake"
- }
- },
+ "uri": "https://git.openembedded.org/bitbake",
"branch": "master",
"rev": "master"
}
},
"openembedded-core": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/openembedded-core"
- }
- },
+ "uri": "https://git.openembedded.org/openembedded-core",
"branch": "master",
"rev": "master"
}
},
"meta-yocto": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/meta-yocto"
- }
- },
+ "uri": "https://git.yoctoproject.org/meta-yocto",
"branch": "master",
"rev": "master"
}
},
"yocto-docs": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/yocto-docs"
- }
- },
+ "uri": "https://git.yoctoproject.org/yocto-docs",
"branch": "master",
"rev": "master"
}
diff --git a/default-registry/configurations/poky-whinlatter.conf.json b/default-registry/configurations/poky-whinlatter.conf.json
index bfa67426d..80b3c7f8c 100644
--- a/default-registry/configurations/poky-whinlatter.conf.json
+++ b/default-registry/configurations/poky-whinlatter.conf.json
@@ -4,44 +4,28 @@
"sources": {
"bitbake": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/bitbake"
- }
- },
+ "uri": "https://git.openembedded.org/bitbake",
"branch": "2.16",
"rev": "2.16"
}
},
"openembedded-core": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/openembedded-core"
- }
- },
+ "uri": "https://git.openembedded.org/openembedded-core",
"branch": "whinlatter",
"rev": "whinlatter"
}
},
"meta-yocto": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/meta-yocto"
- }
- },
+ "uri": "https://git.yoctoproject.org/meta-yocto",
"branch": "whinlatter",
"rev": "whinlatter"
}
},
"yocto-docs": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.yoctoproject.org/yocto-docs"
- }
- },
+ "uri": "https://git.yoctoproject.org/yocto-docs",
"branch": "whinlatter",
"rev": "whinlatter"
}
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 4/4] doc/bitbake-setup: document "uri" property
2025-12-23 10:17 [PATCH v5 1/4] bitbake-setup: add inline URI Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 2/4] layers.schema.json: support 'uri' Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations Corentin Guillevic
@ 2025-12-23 10:17 ` Corentin Guillevic
2025-12-23 10:59 ` [bitbake-devel] " Antonin Godard
2 siblings, 1 reply; 6+ messages in thread
From: Corentin Guillevic @ 2025-12-23 10:17 UTC (permalink / raw)
To: bitbake-devel; +Cc: Corentin Guillevic
The property 'uri' is a simplification of the property 'remotes'. It is
used to provide only one URI.
Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
---
.../bitbake-user-manual-environment-setup.rst | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
index ec1bdeecd..b3588f27d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
@@ -673,11 +673,7 @@ They contain the following sections:
"sources": {
"bitbake": {
"git-remote": {
- "remotes": {
- "origin": {
- "uri": "https://git.openembedded.org/bitbake"
- }
- },
+ "uri": "https://git.openembedded.org/bitbake",
"branch": "master",
"rev": "master"
},
@@ -716,6 +712,12 @@ They contain the following sections:
- ``branch`` (**required**): the Git branch, used to check that the
specified ``rev`` is indeed on that branch.
+ - ``uri`` (*optional*): a URI that follows the git URI syntax. Can replace the
+ ``remotes`` structure if only one URI is provided. Despite this, ``uri`` and
+ ``remotes`` can still be used together.
+
+ See https://git-scm.com/docs/git-clone#_git_urls for more information.
+
- ``local`` (*optional*): specifies a path on local disk that should be symlinked
to under ``layers/``. This is useful for local development, where some layer
or other component used in a build is managed separately, but should still be
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [bitbake-devel] [PATCH v5 4/4] doc/bitbake-setup: document "uri" property
2025-12-23 10:17 ` [PATCH v5 4/4] doc/bitbake-setup: document "uri" property Corentin Guillevic
@ 2025-12-23 10:59 ` Antonin Godard
0 siblings, 0 replies; 6+ messages in thread
From: Antonin Godard @ 2025-12-23 10:59 UTC (permalink / raw)
To: corentin.guillevic, bitbake-devel
Hi,
On Tue Dec 23, 2025 at 11:17 AM CET, Corentin Guillevic via lists.openembedded.org wrote:
> The property 'uri' is a simplification of the property 'remotes'. It is
> used to provide only one URI.
>
> Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
> ---
> .../bitbake-user-manual-environment-setup.rst | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
> index ec1bdeecd..b3588f27d 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
> @@ -673,11 +673,7 @@ They contain the following sections:
> "sources": {
> "bitbake": {
> "git-remote": {
> - "remotes": {
> - "origin": {
> - "uri": "https://git.openembedded.org/bitbake"
> - }
> - },
Can you please port this deleted example under the description of the "remotes"
property?
We still want to show how someone can configure this property. It would be nice
if you could showcase another remote name, so it highlights why this option
could be used instead of the simplified "uri" option.
Something like:
"git-remote": {
"remotes": {
"origin": {
"uri": "https://git.openembedded.org/bitbake"
},
"contrib": {
"uri": "https://git.openembedded.org/bitbake-contrib"
}
},
}
And then explain how one or the other can be used with bitbake-setup (I have no
clue).
This also makes the "remotes" option optional, so you need to update its
description.
> + "uri": "https://git.openembedded.org/bitbake",
> "branch": "master",
> "rev": "master"
> },
> @@ -716,6 +712,12 @@ They contain the following sections:
> - ``branch`` (**required**): the Git branch, used to check that the
> specified ``rev`` is indeed on that branch.
>
> + - ``uri`` (*optional*): a URI that follows the git URI syntax. Can replace the
s/Can/You can/
> + ``remotes`` structure if only one URI is provided. Despite this, ``uri`` and
> + ``remotes`` can still be used together.
> +
> + See https://git-scm.com/docs/git-clone#_git_urls for more information.
> +
> - ``local`` (*optional*): specifies a path on local disk that should be symlinked
> to under ``layers/``. This is useful for local development, where some layer
> or other component used in a build is managed separately, but should still be
Thanks,
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bitbake-devel] [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations
2025-12-23 10:17 ` [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations Corentin Guillevic
@ 2026-01-09 13:41 ` Alexander Kanavin
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2026-01-09 13:41 UTC (permalink / raw)
To: corentin.guillevic; +Cc: bitbake-devel
On Tue, 23 Dec 2025 at 11:18, Corentin Guillevic via
lists.openembedded.org
<corentin.guillevic=smile.fr@lists.openembedded.org> wrote:
> .../oe-nodistro-master.conf.json | 18 +++-----------
> .../oe-nodistro-whinlatter.conf.json | 18 +++-----------
> .../configurations/poky-master.conf.json | 24 ++++---------------
> .../configurations/poky-whinlatter.conf.json | 24 ++++---------------
Hello Corentin,
I forgot to mention this: whinlatter configs should still use the old
format. The issue is initializing them with bitbake-setup from master,
and then using bitbake-setup from that whinlatter-based setup to run
status/update operations. That older bitbake-setup doesn't know about
the new format, and it will fail.
Other than this, and Antonin's docs comments, the patchset looks good.
Note that there are other bitbake-setup patches flowing into master at
the moment, so make sure it's all rebased before sending.
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-09 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 10:17 [PATCH v5 1/4] bitbake-setup: add inline URI Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 2/4] layers.schema.json: support 'uri' Corentin Guillevic
2025-12-23 10:17 ` [PATCH v5 3/4] bitbake-setup: use URI shortcut for all configurations Corentin Guillevic
2026-01-09 13:41 ` [bitbake-devel] " Alexander Kanavin
2025-12-23 10:17 ` [PATCH v5 4/4] doc/bitbake-setup: document "uri" property Corentin Guillevic
2025-12-23 10:59 ` [bitbake-devel] " Antonin Godard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.