AlmaLinux / alma-sbom

AlmaLinux OS SBOM data management utility.
GNU General Public License v3.0
11 stars 5 forks source link

KeyError: 'srpm_url' #47

Open KAWAHARA-souta opened 2 months ago

KAWAHARA-souta commented 2 months ago

I've found an issue that occurs only in epel-release-9-2.el9.noarch.rpm in the range of AlmaLinux 9.2 and later packages.

$ python alma_sbom.py --rpm-package epel-release-9-2.el9.noarch.rpm --file-format spdx-json --output-file dust
Sep 06 10:53:36 alma-sbom: [WARNING] build info are lacking.
Traceback (most recent call last):
  File "/home/khwarizmi/alma-sbom/alma_sbom.py", line 797, in <module>
    cli_main()
  File "/home/khwarizmi/alma-sbom/alma_sbom.py", line 767, in cli_main
    sbom = get_info_about_package(
  File "/home/khwarizmi/alma-sbom/alma_sbom.py", line 467, in get_info_about_package
    result['metadata']['component'] = _get_each_package_component(
  File "/home/khwarizmi/alma-sbom/alma_sbom.py", line 366, in _get_each_package_component
    _add_package_source_info(
  File "/home/khwarizmi/alma-sbom/alma_sbom.py", line 260, in _add_package_source_info
    'value': immudb_metadata['srpm_url'],
KeyError: 'srpm_url'
KAWAHARA-souta commented 2 months ago

Note: This issue occured in the #26 fixed version. (Before this issue occurs, #26 happens.)