summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/spdx_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/spdx_common.py')
-rw-r--r--meta/lib/oe/spdx_common.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/oe/spdx_common.py b/meta/lib/oe/spdx_common.py
index f23100fe03..dfe90f96cf 100644
--- a/meta/lib/oe/spdx_common.py
+++ b/meta/lib/oe/spdx_common.py
@@ -42,14 +42,13 @@ def is_work_shared_spdx(d):
42 42
43 43
44def load_spdx_license_data(d): 44def load_spdx_license_data(d):
45 if d.getVar("SPDX_LICENSE_DATA"):
46 return
47 45
48 with open(d.getVar("SPDX_LICENSES"), "r") as f: 46 with open(d.getVar("SPDX_LICENSES"), "r") as f:
49 data = json.load(f) 47 data = json.load(f)
50 # Transform the license array to a dictionary 48 # Transform the license array to a dictionary
51 data["licenses"] = {l["licenseId"]: l for l in data["licenses"]} 49 data["licenses"] = {l["licenseId"]: l for l in data["licenses"]}
52 d.setVar("SPDX_LICENSE_DATA", data) 50
51 return data
53 52
54 53
55def process_sources(d): 54def process_sources(d):