[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH 7/7] insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only)
From:       "Richard Purdie" <richard.purdie () linuxfoundation ! org>
Date:       2023-03-31 22:38:14
Message-ID: a6235a98d5aa6f23872e670f7f089cb651c76065.camel () linuxfoundation ! org
[Download RAW message or body]

On Fri, 2023-03-31 at 07:26 +0200, Alexander Kanavin wrote:
> Absent maintainer entries are as well a frequent source of friction, as they are \
> checked only in selftest, and so aren revealed until autobuilder runs.
> 
> The selftest is retained as it also checks for obsolete entries in maintainers.inc
> (not possible to do in insane class).
> 
> The insane check also looks up entries in a different way than selftest (from \
> actual filenames), and so additional lines in maintainer.inc are needed; I took the \
> opportunity to adjust and clean up exception lists in selftest to match.
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> meta/classes-global/insane.bbclass         | 12 ++++++++++++
> meta/conf/distro/include/maintainers.inc   | 16 ++++++++++++++++
> meta/lib/oeqa/selftest/cases/distrodata.py |  6 +++---
> 3 files changed, 31 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes-global/insane.bbclass \
> b/meta/classes-global/insane.bbclass index 64ad76c48e9..dacbd431e53 100644
> --- a/meta/classes-global/insane.bbclass
> +++ b/meta/classes-global/insane.bbclass
> @@ -1499,7 +1499,19 @@ python do_qa_fetch() {
> else:
> oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not contain a \
> HOMEPAGE. Please add an entry.".format(pn, fn), d) 
> +    def test_missing_maintainer(d):
> +        fn = d.getVar("FILE")
> +        if not '/meta/recipes-' in fn:
> +            # We are only interested in OE-Core
> +            return
> +        # PN or BPN are not suitable as they are tweaked to match class variants, \
> and it's not possible +        # to map them back to the actual original item in \
> recipe filename. +        pn = \
> os.path.splitext(os.path.basename(d.getVar('FILE')))[0].split('_')[0] +        if \
> not d.getVar('RECIPE_MAINTAINER:pn-{}'.format(pn)): +            \
> oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not have an assigned \
> maintainer. Please add an entry into \
> meta/conf/distro/include/maintainers.inc.".format(pn, fn), d) +
> test_missing_metadata(d)
> +    test_missing_maintainer(d)
> oe.qa.exit_if_errors(d)
> }
> 
> diff --git a/meta/conf/distro/include/maintainers.inc \
> b/meta/conf/distro/include/maintainers.inc index 682ec2cfdfb..1af6ccdbb71 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -62,9 +62,12 @@ RECIPE_MAINTAINER:pn-bash-completion = "Alexander Kanavin \
> <alex.kanavin@gmail.co RECIPE_MAINTAINER:pn-bc = "Anuj Mittal \
> <anuj.mittal@intel.com>" RECIPE_MAINTAINER:pn-bind = "Armin Kuster \
> <akuster808@gmail.com>" RECIPE_MAINTAINER:pn-binutils = "Khem Raj \
> <raj.khem@gmail.com>" +RECIPE_MAINTAINER:pn-binutils-cross = "Khem Raj \
> <raj.khem@gmail.com>"

This is just wrong, there is no recipe named "binutils-cross" once
parsed and the pn override (which should have been called recipe name)
is set to that.

I appreciate what you're trying to do here but adding bogus incorrect
metadata isn't something I want to encourage.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179457): https://lists.openembedded.org/g/openembedded-core/message/179457
Mute This Topic: https://lists.openembedded.org/mt/97967691/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic