diff mbox series

[2/2] layer.conf: enable test for revision alongside a git URI

Message ID 20251113181157.410053-2-corentin.guillevic@smile.fr
State New
Headers show
Series [1/2] insane.bbclass: check revision for every git URI | expand

Commit Message

Corentin Guillevic Nov. 13, 2025, 6:11 p.m. UTC
As meta is the main layer, its recipes should fully comply with revisions
for git URIs. Enable the check for this layer only.

Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
---
 meta/conf/layer.conf | 3 +++
 1 file changed, 3 insertions(+)

Comments

Peter Marko Nov. 13, 2025, 7:34 p.m. UTC | #1
Perhaps this could be a warning by default in insane class and meta-poky could upgrade it via WARN_TO_ERROR_QA?
Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Corentin Guillevic via
> lists.openembedded.org
> Sent: Thursday, November 13, 2025 19:12
> To: openembedded-core@lists.openembedded.org
> Cc: Corentin Guillevic <corentin.guillevic@smile.fr>
> Subject: [OE-core] [PATCH 2/2] layer.conf: enable test for revision alongside a git
> URI
> 
> As meta is the main layer, its recipes should fully comply with revisions
> for git URIs. Enable the check for this layer only.
> 
> Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
> ---
>  meta/conf/layer.conf | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
> index ba25ca3029..1f95867165 100644
> --- a/meta/conf/layer.conf
> +++ b/meta/conf/layer.conf
> @@ -19,6 +19,9 @@ BBLAYERS_LAYERINDEX_NAME_core = "openembedded-
> core"
>  # Set a variable to get to the top of the metadata location
>  COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
> 
> +# Raise an error if no revision is provided with a git URI
> +ERROR_QA:append:layer-core = " missing-srcrev"
> +
>  # opkg-utils is for update-alternatives :(
>  SIGGEN_EXCLUDERECIPES_ABISAFE += " \
>    sysvinit-inittab \
> --
> 2.49.0
Yoann Congal Nov. 13, 2025, 8:20 p.m. UTC | #2
Le jeu. 13 nov. 2025 à 20:34, Peter Marko via lists.openembedded.org
<peter.marko=siemens.com@lists.openembedded.org> a écrit :

> Perhaps this could be a warning by default in insane class and meta-poky
> could upgrade it via WARN_TO_ERROR_QA?
>

Yes, but it would warn on the supported use case of targeting the moving
tip of a git branch.
It is wrong to do that in OE layers (oe-core to meta-oe) but it should be
possible in downstream user-layers.

If I remember correctly, when I talked about this idea in a call (can't
remember which one), the consensus was to use "layer-specific" QA checks to
enforce it on oe-core (and most likely meta-openembedded) but not by
default.
... but it can be revisited.

Peter
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Corentin Guillevic via
> > lists.openembedded.org
> > Sent: Thursday, November 13, 2025 19:12
> > To: openembedded-core@lists.openembedded.org
> > Cc: Corentin Guillevic <corentin.guillevic@smile.fr>
> > Subject: [OE-core] [PATCH 2/2] layer.conf: enable test for revision
> alongside a git
> > URI
> >
> > As meta is the main layer, its recipes should fully comply with revisions
> > for git URIs. Enable the check for this layer only.
> >
> > Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
> > ---
> >  meta/conf/layer.conf | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
> > index ba25ca3029..1f95867165 100644
> > --- a/meta/conf/layer.conf
> > +++ b/meta/conf/layer.conf
> > @@ -19,6 +19,9 @@ BBLAYERS_LAYERINDEX_NAME_core = "openembedded-
> > core"
> >  # Set a variable to get to the top of the metadata location
> >  COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
> >
> > +# Raise an error if no revision is provided with a git URI
> > +ERROR_QA:append:layer-core = " missing-srcrev"
> > +
> >  # opkg-utils is for update-alternatives :(
> >  SIGGEN_EXCLUDERECIPES_ABISAFE += " \
> >    sysvinit-inittab \
> > --
> > 2.49.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#226265):
> https://lists.openembedded.org/g/openembedded-core/message/226265
> Mute This Topic: https://lists.openembedded.org/mt/116278978/4316185
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> yoann.congal@smile.fr]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index ba25ca3029..1f95867165 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -19,6 +19,9 @@  BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
 # Set a variable to get to the top of the metadata location
 COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
 
+# Raise an error if no revision is provided with a git URI
+ERROR_QA:append:layer-core = " missing-srcrev"
+
 # opkg-utils is for update-alternatives :(
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
   sysvinit-inittab \