diff mbox series

[v6,4/4] doc/bitbake-setup: document "uri" property

Message ID 20260123172422.3304682-4-corentin.guillevic@smile.fr
State New
Headers show
Series [v6,1/4] bitbake-setup: add inline URI | expand

Commit Message

Corentin Guillevic Jan. 23, 2026, 5:24 p.m. UTC
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 | 42 ++++++++++++++++---
 1 file changed, 36 insertions(+), 6 deletions(-)

Comments

Antonin Godard Jan. 26, 2026, 8:37 a.m. UTC | #1
Hi,

On Fri Jan 23, 2026 at 6:24 PM 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 | 42 ++++++++++++++++---
>  1 file changed, 36 insertions(+), 6 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 3b6a73fd8..d20ddcaea 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"
>                   },
> @@ -714,10 +710,38 @@ They contain the following sections:
>  
>        ``git-remote`` entries are specified with the following options:
>  
> -      -  ``remotes`` (**required**): a dictionary of git remote names, each containing a ``uri`` property
> +      -  ``remotes`` (*optional*): a dictionary of git remote names, each containing a ``uri`` property
>           with a URI that follows the git URI syntax. See https://git-scm.com/docs/git-clone#_git_urls
>           and https://git-scm.com/docs/git-remote for more information.
>  
> +         This structure is useful if you want to provide several remotes. Please
> +         note that each URI will be cloned, but only the the last treated one
> +         will be used in the unpacked source.

Indeed, it doesn't have much purpose then at the moment I guess, but that's what
it does! I guess the code should be adjusted to crate a repository with multiple
remotes, I think that's what someone would expect…

Anyway it's not part of your series. Thanks for trying it out.

> +
> +         Example:
> +
> +         .. code-block:: json
> +            :force:
> +
> +            {
> +               "sources": {
> +                   "bitbake": {
> +                       "git-remote": {
> +                           "remotes": {
> +                               "origin": {
> +                                   "uri": "https://git.openembedded.org/bitbake"
> +                               },
> +                               "contrib": {
> +                                   "uri": "https://git.openembedded.org/bitbake-contrib"
> +                               }
> +                           },
> +                           "branch": "master",
> +                           "rev": "master"
> +                       },
> +                       "path": "bitbake"
> +                   }
> +               }
> +            }
>        -  ``rev`` (**required**): the revision to checkout. Can be the name of the
>           branch to checkout on the latest revision of the specified ``branch``.
>  
> @@ -728,6 +752,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. You 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

This looks good to me, thanks

Reviewed-by: Antonin Godard <antonin.godard@bootlin.com>

Antonin
diff mbox series

Patch

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 3b6a73fd8..d20ddcaea 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"
                  },
@@ -714,10 +710,38 @@  They contain the following sections:
 
       ``git-remote`` entries are specified with the following options:
 
-      -  ``remotes`` (**required**): a dictionary of git remote names, each containing a ``uri`` property
+      -  ``remotes`` (*optional*): a dictionary of git remote names, each containing a ``uri`` property
          with a URI that follows the git URI syntax. See https://git-scm.com/docs/git-clone#_git_urls
          and https://git-scm.com/docs/git-remote for more information.
 
+         This structure is useful if you want to provide several remotes. Please
+         note that each URI will be cloned, but only the the last treated one
+         will be used in the unpacked source.
+
+         Example:
+
+         .. code-block:: json
+            :force:
+
+            {
+               "sources": {
+                   "bitbake": {
+                       "git-remote": {
+                           "remotes": {
+                               "origin": {
+                                   "uri": "https://git.openembedded.org/bitbake"
+                               },
+                               "contrib": {
+                                   "uri": "https://git.openembedded.org/bitbake-contrib"
+                               }
+                           },
+                           "branch": "master",
+                           "rev": "master"
+                       },
+                       "path": "bitbake"
+                   }
+               }
+            }
       -  ``rev`` (**required**): the revision to checkout. Can be the name of the
          branch to checkout on the latest revision of the specified ``branch``.
 
@@ -728,6 +752,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. You 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