classes/create-spdx-2.2: Make license errors fatal

Otherwise the task is still put into sstate, which means the error can
effectively be hidden by ignoring it.

(From OE-Core rev: 9d00f3ba4555510cf9525f4f6f186bf8a1371cee)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2023-06-01 15:32:20 -05:00
committed by Richard Purdie
parent c47ba43785
commit 034762abbd

View File

@@ -138,7 +138,7 @@ def convert_license_to_spdx(lic, document, d, existing={}):
with open(filename, errors="replace") as f:
extracted_info.extractedText = f.read()
else:
bb.error("Cannot find any text for license %s" % name)
bb.fatal("Cannot find any text for license %s" % name)
extracted[name] = extracted_info
document.hasExtractedLicensingInfos.append(extracted_info)