insights-core
insights-core copied to clipboard
The comparison of InstalledRpm should be skipped when no epoch field
If installed-rpms file from sosreport does not contain epoch, parser would set the “epoch” as “0” by default. However, “epoch” is 1 from the current back-code. Then comparison will return true even when the installed version is after the fixed version as code will check “epoch” before version.
Example:
Code: FIXED_NETWORK_MANAGER_PACKAGE = InstalledRpm.from_json('{"name":"NetworkManager","epoch":"1","version":"1.4.0","release":"12.el7","arch":"x86_64"}')
Fixed version: NetworkManager-1.4.0-12.el7
Hit version from sosreport: NetworkManager-1.8.0-9.el7
This comp should be skipped when no epoch field from installed-rpms file