]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-spdx: handle CLOSED license
authorRoss Burton <ross@burtonini.com>
Mon, 6 Sep 2021 14:36:13 +0000 (15:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Sep 2021 08:25:04 +0000 (09:25 +0100)
The special CLOSED license means that this is closed source code with
no other licensing assertions.  It's not a generic license in oe-core,
and not a SPDX license, so transform it to NONE explicitly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/create-spdx.bbclass

index 0a2fad564012f166d15dc42e369ed6f8ebeb5a62..db85677d4ce7e8b31027e1950bc37b5e3b42e12b 100644 (file)
@@ -105,6 +105,9 @@ def convert_license_to_spdx(lic, document, d, existing={}):
         if l == "|":
             return "OR"
 
+        if l == "CLOSED":
+            return "NONE"
+
         spdx_license = d.getVarFlag("SPDXLICENSEMAP", l) or l
         if spdx_license in license_data["licenses"]:
             return spdx_license