[elbe-devel] [PATCH v2 07/11] elbepack: parselicence: also map licence ID including exception

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Jul 24 12:22:03 CEST 2024


Make the full mappings already present in example-mapping.xml work.
Right now these are not used during the tests, but they should be usable
by endusers.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/commands/parselicence.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elbepack/commands/parselicence.py b/elbepack/commands/parselicence.py
index 54462f7ee9f3..c1b96a395364 100644
--- a/elbepack/commands/parselicence.py
+++ b/elbepack/commands/parselicence.py
@@ -55,6 +55,10 @@ class license_dep5_to_spdx (dict):
         return None
 
     def map_one_license_with_exception(self, pkgname, lic, errors):
+        mapped_lic = self.map_one_license(pkgname, lic)
+        if mapped_lic is not None:
+            return mapped_lic
+
         with_split = lic.split(' with ')
 
         mapped_lic = self.map_one_license(pkgname, with_split[0])

-- 
2.45.2



More information about the elbe-devel mailing list