diff options
Diffstat (limited to 'meta/lib/oe/sbom30.py')
-rw-r--r-- | meta/lib/oe/sbom30.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py index 27ed74f810..2cea56ac3e 100644 --- a/meta/lib/oe/sbom30.py +++ b/meta/lib/oe/sbom30.py | |||
@@ -558,8 +558,8 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): | |||
558 | scope=scope, | 558 | scope=scope, |
559 | ) | 559 | ) |
560 | 560 | ||
561 | def new_license_expression(self, license_expression, license_text_map={}): | 561 | def new_license_expression(self, license_expression, license_data, license_text_map={}): |
562 | license_list_version = self.d.getVar("SPDX_LICENSE_DATA")["licenseListVersion"] | 562 | license_list_version = license_data["licenseListVersion"] |
563 | # SPDX 3 requires that the license list version be a semver | 563 | # SPDX 3 requires that the license list version be a semver |
564 | # MAJOR.MINOR.MICRO, but the actual license version might be | 564 | # MAJOR.MINOR.MICRO, but the actual license version might be |
565 | # MAJOR.MINOR on some older versions. As such, manually append a .0 | 565 | # MAJOR.MINOR on some older versions. As such, manually append a .0 |
@@ -607,14 +607,14 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): | |||
607 | 607 | ||
608 | return lic | 608 | return lic |
609 | 609 | ||
610 | def scan_declared_licenses(self, spdx_file, filepath): | 610 | def scan_declared_licenses(self, spdx_file, filepath, license_data): |
611 | for e in spdx_file.extension: | 611 | for e in spdx_file.extension: |
612 | if isinstance(e, OELicenseScannedExtension): | 612 | if isinstance(e, OELicenseScannedExtension): |
613 | return | 613 | return |
614 | 614 | ||
615 | file_licenses = set() | 615 | file_licenses = set() |
616 | for extracted_lic in oe.spdx_common.extract_licenses(filepath): | 616 | for extracted_lic in oe.spdx_common.extract_licenses(filepath): |
617 | file_licenses.add(self.new_license_expression(extracted_lic)) | 617 | file_licenses.add(self.new_license_expression(extracted_lic, license_data)) |
618 | 618 | ||
619 | self.new_relationship( | 619 | self.new_relationship( |
620 | [spdx_file], | 620 | [spdx_file], |