diff mbox series

[3/5] insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only)

Message ID 20230427073528.3956414-3-alex@linutronix.de
State New
Headers show
Series [1/5] insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only) | expand

Commit Message

Alexander Kanavin April 27, 2023, 7:35 a.m. UTC
Absent maintainer entries are as well a frequent source of friction, as they are checked
only in selftest, and so aren't 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).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/classes-global/insane.bbclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Martin Jansa April 28, 2023, 10:36 a.m. UTC | #1
On Thu, Apr 27, 2023 at 9:35 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> Absent maintainer entries are as well a frequent source of friction, as
> they are checked
> only in selftest, and so aren't 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).
>

I've seen many errors triggered by this and was wondering what's going on
and it's caused by meta-security layers which provide own
conf/distro/include/maintainers.inc:

meta-security $ find . -name maintainers.inc
./meta-tpm/conf/distro/include/maintainers.inc
./conf/distro/include/maintainers.inc

So this doesn't work well with:
meta/conf/distro/defaultsetup.conf:include
conf/distro/include/maintainers.inc

as it "replaces" the file instead of adding more RECIPE_MAINTAINERs.

I think this should be fixed somehow before this gets enabled in oe-core.
Alexander Kanavin April 28, 2023, 11:54 a.m. UTC | #2
On Fri, 28 Apr 2023 at 12:37, Martin Jansa <martin.jansa@gmail.com> wrote:
> I've seen many errors triggered by this and was wondering what's going on and it's caused by meta-security layers which provide own conf/distro/include/maintainers.inc:
>
> meta-security $ find . -name maintainers.inc
> ./meta-tpm/conf/distro/include/maintainers.inc
> ./conf/distro/include/maintainers.inc
>
> So this doesn't work well with:
> meta/conf/distro/defaultsetup.conf:include conf/distro/include/maintainers.inc
>
> as it "replaces" the file instead of adding more RECIPE_MAINTAINERs.
>
> I think this should be fixed somehow before this gets enabled in oe-core.

I sent a patch for this to yocto@ list.

Alex
diff mbox series

Patch

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 64ad76c48e9..0847fb0807a 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 = d.getVar("PN")
+        if pn.endswith("-native") or pn.startswith("nativesdk-"):
+            return
+        if not d.getVar('RECIPE_MAINTAINER'):
+            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)
 }