Skip to content

Conversation

@NullPointer-cell
Copy link

@NullPointer-cell NullPointer-cell commented Jan 17, 2026

Problem

RPM packages were showing incomplete version strings. The release field was being dropped, causing versions like 4.4.20-4.el8_6 to appear as just 4.4.20.

Solution

Modified rpm_installed.py to capture and combine the version and release fields using the same logic as EVR.to_string() in rpm.py.

Changes

  • Added handlers for Epoch and Release RPM tags
  • Implemented inline version-release-epoch combining logic to avoid circular imports
  • Updated 9 test expected files to reflect full version strings

Testing

  • All 85 RPM tests passing (76 in test_rpm.py + 9 in test_rpm_installed.py)
  • No circular imports introduced
  • Edge cases verified (missing release, epoch handling)

Example

Before: pkg:rpm/[email protected]?arch=x86_64
After: pkg:rpm/[email protected]_6?arch=x86_64

Fixes #4684

Tasks

Reviewed contribution guidelines
PR is descriptively titled and links the original issue above
Tests pass -- look for a green checkbox (All 85 RPM tests passing locally)
Commits are in uniquely-named feature branch and has no merge conflicts
Updated documentation pages (not applicable - internal implementation change)
Updated CHANGELOG.rst (not applicable - bug fix, maintainers will update)

Modified rpm_installed.py to combine version and release fields:
- Added handlers for Epoch and Release tags
- Implemented version-release-epoch combining logic inline
- Matches EVR.to_string() behavior from rpm.py
- Updated 9 test expected files with full version strings

All 85 RPM tests passing. No circular imports introduced.

Fixes aboutcode-org#4684

Signed-off-by: NullPointer-cell <[email protected]>
@NullPointer-cell
Copy link
Author

@pombredanne sir
I would like you to review my pr and I would be happy to any recommendation on changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPMs version is truncated in container image scan

1 participant