All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multilib.bbclass: fix qa warning of kernel-devicetree
@ 2019-11-19  3:15 kai.kang
  2019-11-26  2:58 ` Kang Kai
  0 siblings, 1 reply; 2+ messages in thread
From: kai.kang @ 2019-11-19  3:15 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

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'.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/classes/multilib.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 1a9295d36f..ee677da1e2 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -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)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] multilib.bbclass: fix qa warning of kernel-devicetree
  2019-11-19  3:15 [PATCH] multilib.bbclass: fix qa warning of kernel-devicetree kai.kang
@ 2019-11-26  2:58 ` Kang Kai
  0 siblings, 0 replies; 2+ messages in thread
From: Kang Kai @ 2019-11-26  2:58 UTC (permalink / raw)
  To: openembedded-core

On 2019/11/19 上午11:15, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> 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'.

Any comment please?

Regards,
Kai


>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/classes/multilib.bbclass | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
> index 1a9295d36f..ee677da1e2 100644
> --- a/meta/classes/multilib.bbclass
> +++ b/meta/classes/multilib.bbclass
> @@ -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)


-- 
Kai Kang



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-26  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19  3:15 [PATCH] multilib.bbclass: fix qa warning of kernel-devicetree kai.kang
2019-11-26  2:58 ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.