[6/6] base.bbclass: Clean up code to determine if licenses need checking

Message ID 20220227182138.5364-6-peter.kjellerstedt@axis.com
State New
Headers show
Series [1/6] default-distrovars.inc: Remove the empty default for WHITELIST_GPL-3.0 | expand

Commit Message

Peter Kjellerstedt Feb. 27, 2022, 6:21 p.m. UTC
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes/base.bbclass | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 55f654d37d..b5f2aa3da8 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -583,14 +583,12 @@  python () {
 
         bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE') or "").split()
 
-        check_license = False if pn.startswith("nativesdk-") else True
+        check_license = not pn.startswith("nativesdk-") and not pn.startswith("gcc-source-")
         for t in ["-native", "-cross-${TARGET_ARCH}", "-cross-initial-${TARGET_ARCH}",
               "-crosssdk-${SDK_SYS}", "-crosssdk-initial-${SDK_SYS}",
               "-cross-canadian-${TRANSLATED_TARGET_ARCH}"]:
             if pn.endswith(d.expand(t)):
                 check_license = False
-        if pn.startswith("gcc-source-"):
-            check_license = False
 
         if check_license and bad_licenses:
             bad_licenses = expand_wildcard_licenses(d, bad_licenses)