| Message ID | 20251202160402.819060-2-corentin.guillevic@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | [1/2] bitbake-setup: add inline URI | expand |
On Tue, 2 Dec 2025 at 17:04, Corentin Guillevic via lists.openembedded.org <corentin.guillevic=smile.fr@lists.openembedded.org> wrote: - } > + }, > + "oneOf": [ > + { > + "required": [ > + "uri" > + ] > + }, > + { > + "required": [ > + "remotes" > + ] > + } > + ] I don't think it needs to be mutually exclusive. If both uri and remotes are present that's not an invalid combination. Alex.
Le mar. 2 déc. 2025 à 17:13, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> a écrit : > On Tue, 2 Dec 2025 at 17:04, Corentin Guillevic via > lists.openembedded.org > <corentin.guillevic=smile.fr@lists.openembedded.org> wrote: > - } > > + }, > > + "oneOf": [ > > + { > > + "required": [ > > + "uri" > > + ] > > + }, > > + { > > + "required": [ > > + "remotes" > > + ] > > + } > > + ] > > I don't think it needs to be mutually exclusive. If both uri and > remotes are present that's not an invalid combination. > That was to avoid weird behavior on "origin" being defined twice: once in "uri" and once in remotes/origin. How do you suggest to handle this case, throw an error? > > Alex. > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#18510): > https://lists.openembedded.org/g/bitbake-devel/message/18510 > Mute This Topic: https://lists.openembedded.org/mt/116578607/4316185 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ > yoann.congal@smile.fr] > -=-=-=-=-=-=-=-=-=-=-=- > >
On Tue, 2 Dec 2025 at 18:53, Yoann Congal <yoann.congal@smile.fr> wrote: > That was to avoid weird behavior on "origin" being defined twice: once in "uri" and once in remotes/origin. > How do you suggest to handle this case, throw an error? If a config defines the same fetch uri twice, regardless of which syntax is used, that's a mistake in the config. Not the reason to make the two ways mutually exclusive. Or did I misunderstand you? Can you show an example? Alex
diff --git a/setup-schema/layers.schema.json b/setup-schema/layers.schema.json index 144ea6d9f..68befa08a 100644 --- a/setup-schema/layers.schema.json +++ b/setup-schema/layers.schema.json @@ -46,8 +46,12 @@ "description": "The output of 'git describe' (human readable description of the revision using tags in revision history).", "type": "string" }, + "uri": { + "description": "The URI for the remote 'origin'. Mutually exclusive with 'remotes'", + "type": "string" + }, "remotes": { - "description": "The dict of git remotes to add to this repository", + "description": "The dict of git remotes to add to this repository. Mutually exclusive with 'uri'", "type": "object", "patternProperties": { ".*" : { "description": "A git remote", @@ -64,7 +68,19 @@ } }} } - } + }, + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "remotes" + ] + } + ] } } }
The property 'uri', which is a shortcut for 'remotes/origin/uri', is now supported under 'git-remote'. However, this is mutually exclusive with 'remotes'. Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr> --- setup-schema/layers.schema.json | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)