You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When api_ver == '0.1', epoch becomes 0 regardless of its actual value.
For packages where epoch is a value other than 0, an incorrect value(=0) is set.
Reproducer
The epoch value of cups-2.3.3op2-16.el9.x86_64.rpm is '1'
In the constructor of the PackageNevra class, epoch is set to None, and when epoch is None, it is interpreted as equivalent to 0. Therefore, when api_ver == '0.1', epoch always becomes 0.
I think it would be good to remove the epoch and adopt NVRA when api_ver == '0.1'.
I'm thinking of addressing this while also considering the data structure of the sbom class.
The text was updated successfully, but these errors were encountered:
When api_ver == '0.1', epoch becomes 0 regardless of its actual value.
For packages where epoch is a value other than 0, an incorrect value(=0) is set.
Reproducer
The epoch value of cups-2.3.3op2-16.el9.x86_64.rpm is '1'
Creating an SBOM and checking the epoch value, it becomes 0.
Overview of this issue
When api_ver == '0.1', split_name_of_package_by_nevra is used to attempt to split the package name and obtain the NEVRA of the package.
https://github.com/AlmaLinux/alma-sbom/blob/main/alma_sbom.py#L143-L155
However, the package names handled by alma-sbom do not include the epoch, and split_name_of_package_by_nevra does not retrieve the epoch either.
https://github.com/AlmaLinux/alma-sbom/blob/main/alma_sbom.py#L98C1-L108C25
In the constructor of the PackageNevra class, epoch is set to None, and when epoch is None, it is interpreted as equivalent to 0. Therefore, when api_ver == '0.1', epoch always becomes 0.
https://github.com/AlmaLinux/alma-sbom/blob/main/alma_sbom.py#L26-L31
I think it would be good to remove the epoch and adopt NVRA when api_ver == '0.1'.
I'm thinking of addressing this while also considering the data structure of the sbom class.
The text was updated successfully, but these errors were encountered: