Skip to contentSkip to conversation

base.bbclass: Correct the test for obsolete license exceptions

PATCH New Peter Kjellerstedt 1 participant 1 message Jun 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base.bbclass: Correct the test for obsolete license exceptions

The test for obsolete licenses used in INCOMPATIBLE_LICENSE_EXCEPTIONS tried to match the "<package>:<license>" tuples with the obsolete licenses and thus never matched anything.

---
 meta/classes/base.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/base.bbclass +2 -2
index 20968a5076..cc02de5f77 100644
@@ -594,9 +594,9 @@ python () {
 
             for lic_exception in exceptions:
                 if ":" in lic_exception:
-                    lic_exception.split(":")[0]
+                    lic_exception = lic_exception.split(":")[1]
                 if lic_exception in oe.license.obsolete_license_list():
-                    bb.fatal("Invalid license %s used in INCOMPATIBLE_LICENSE_EXCEPTIONS" % lic_exception)
+                    bb.fatal("Obsolete license %s used in INCOMPATIBLE_LICENSE_EXCEPTIONS" % lic_exception)
 
             pkgs = d.getVar('PACKAGES').split()
             skipped_pkgs = {}