colorize: Always color newer packages as SLATE

Previously, if the package in 'new' repo had larger version,
it was still called ORANGE. It was "optimization" from
the times when we had only sisyphus_mipsel, and never
packaged newer versions before the main repo. But for
p9_mipsel that's not true, as well as when comparing
p9_mipsel and sisyphus_mipsel, which we also would
like to do.
This commit is contained in:
Ivan A. Melnikov 2021-08-15 20:28:29 +04:00
parent d52b3e4725
commit aba7fad63b

View File

@ -25,13 +25,12 @@ def colorize_pair(base_package, new_package):
if base_package == new_package:
return 'GREEN'
if base_package.epoch != new_package.epoch:
return 'ORANGE'
if base_package.version != new_package.version:
return 'ORANGE'
c = rpm_ffi.evr_cmp(base_package.evr, new_package.evr, 'pkg')
if c > 0: # base package is newer
if base_package.epoch != new_package.epoch:
return 'ORANGE'
if base_package.version != new_package.version:
return 'ORANGE'
return 'YELLOW'
return 'SLATE'