Skip to contentSkip to conversation

license_class: Fix choose_lic_set into incompatible license

PATCH New Aníbal Limón 1 participant 3 messages Jul 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 license_class: Fix choose_lic_set into incompatible license

Use canonical_license when doing evaluation of license expresion since INCOMPATIBLE_LICENSE are already canonized.

[YOCTO #8080]

---
 meta/classes/license.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/license.bbclass +2 -1
index b62910b..9a8066c 100644
@@ -359,7 +359,8 @@ def incompatible_license(d, dont_want_licenses, package=None):
     # Handles an "or" or two license sets provided by
     # flattened_licenses(), pick one that works if possible.
     def choose_lic_set(a, b):
-        return a if all(license_ok(lic) for lic in a) else b
+        return a if all(license_ok(canonical_license(d, lic)) for lic in a) \
+                else b
 
     try:
         licenses = oe.license.flattened_licenses(license, choose_lic_set)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 license_class: Fix choose_lic_set into incompatible license

Use canonical_license when doing evaluation of license expresion since INCOMPATIBLE_LICENSE are already canonized.

[YOCTO #8080]

---
 meta/classes/license.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/license.bbclass +2 -1
index b62910b..9a8066c 100644
@@ -359,7 +359,8 @@ def incompatible_license(d, dont_want_licenses, package=None):
     # Handles an "or" or two license sets provided by
     # flattened_licenses(), pick one that works if possible.
     def choose_lic_set(a, b):
-        return a if all(license_ok(lic) for lic in a) else b
+        return a if all(license_ok(canonical_license(d, lic)) for lic in a) \
+                else b
 
     try:
         licenses = oe.license.flattened_licenses(license, choose_lic_set)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 license_class: Fix choose_lic_set into incompatible license

In reply to Aníbal Limón

Use canonical_license when doing evaluation of license expresion since INCOMPATIBLE_LICENSE are already canonized.

[YOCTO #8080]

---
 meta/classes/license.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/license.bbclass +2 -2
index 224d541..32e172a 100644
@@ -375,8 +375,8 @@ def incompatible_license(d, dont_want_licenses, package=None):
     # Handles an "or" or two license sets provided by
     # flattened_licenses(), pick one that works if possible.
     def choose_lic_set(a, b):
-        return a if all(oe.license.license_ok(lic, dont_want_licenses) \
-		 for lic in a) else b
+        return a if all(oe.license.license_ok(canonical_license(d, lic), 
+                            dont_want_licenses) for lic in a) else b
 
     try:
         licenses = oe.license.flattened_licenses(license, choose_lic_set)
Signature · 1 line
1.9.1