Skip to contentSkip to conversation

multilib.bbclass: fix qa warning of kernel-devicetree

PATCH In review [email protected] 1 participant 2 messages Nov 19, 2019 – Nov 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multilib.bbclass: fix qa warning of kernel-devicetree

From: Kai Kang <[email protected]>

When kernel-devicetree is in RRECOMMENDS such as via variable MACHINE_EXTRA_RRECOMMENDS for some bsp, it shows QA warning of multilib:

| WARNING: lib32-packagegroup-base-1.0-r83 do_package: QA Issue:
| lib32-packagegroup-base package lib32-packagegroup-machine-base
| - suspicious values 'kernel-devicetree' in RRECOMMENDS [multilib]

Add kernel-devicetree to exceptions to fix the QA issue. Because there are already 3 kernel related criteria, simplify them by judging package names whether start with 'kernel-'. And also refactor to remove duplicate 'not'.

---
 meta/classes/multilib.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes/multilib.bbclass +5 -4
index 1a9295d36f..ee677da1e2 100644
@@ -184,11 +184,12 @@ python do_package_qa_multilib() {
         for i in values:
             if i.startswith('virtual/'):
                 i = i[len('virtual/'):]
-            if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)) and \
-                (not 'cross-canadian' in i) and (not i.startswith("nativesdk-")) and \
-                (not i.startswith("rtld")) and (not i.startswith('kernel-vmlinux')) \
-                and (not i.startswith("kernel-image")) and (not i.startswith("/")):
+
+            if (not (i.startswith(mlprefix) or i.startswith("kernel-") \
+                    or ('cross-canadian' in i) or i.startswith("nativesdk-") \
+                    or i.startswith("rtld") or i.startswith("/"))):
                 candidates.append(i)
+
         if len(candidates) > 0:
             msg = "%s package %s - suspicious values '%s' in %s" \
                    % (d.getVar('PN'), pkg, ' '.join(candidates), var)
Signature · 1 line
2.17.1
author
#1 lore raw
Quoted 5 lines · On 2019/11/19 上午11:15, [email protected] wrote:

From: Kai Kang <[email protected]>

When kernel-devicetree is in RRECOMMENDS such as via variable MACHINE_EXTRA_RRECOMMENDS for some bsp, it shows QA warning of multilib:

Quoted 8 lines
| WARNING: lib32-packagegroup-base-1.0-r83 do_package: QA Issue:
| lib32-packagegroup-base package lib32-packagegroup-machine-base
| - suspicious values 'kernel-devicetree' in RRECOMMENDS [multilib]

Add kernel-devicetree to exceptions to fix the QA issue. Because there are already 3 kernel related criteria, simplify them by judging package names whether start with 'kernel-'. And also refactor to remove duplicate 'not'.

Any comment please?

Regards,
Kai

Quoted 27 lines
---
  meta/classes/multilib.bbclass | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes/multilib.bbclass +5 -4
index 1a9295d36f..ee677da1e2 100644
@@ -184,11 +184,12 @@ python do_package_qa_multilib() {
          for i in values:
              if i.startswith('virtual/'):
                  i = i[len('virtual/'):]
-            if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)) and \
-                (not 'cross-canadian' in i) and (not i.startswith("nativesdk-")) and \
-                (not i.startswith("rtld")) and (not i.startswith('kernel-vmlinux')) \
-                and (not i.startswith("kernel-image")) and (not i.startswith("/")):
+
+            if (not (i.startswith(mlprefix) or i.startswith("kernel-") \
+                    or ('cross-canadian' in i) or i.startswith("nativesdk-") \
+                    or i.startswith("rtld") or i.startswith("/"))):
                  candidates.append(i)
+
          if len(candidates) > 0:
              msg = "%s package %s - suspicious values '%s' in %s" \
                     % (d.getVar('PN'), pkg, ' '.join(candidates), var)
Signature · 1 line
Kai Kang