From aba7fad63b55da1166b76219865afdfe4fa524a8 Mon Sep 17 00:00:00 2001 From: "Ivan A. Melnikov" Date: Sun, 15 Aug 2021 20:28:29 +0400 Subject: [PATCH] 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. --- port_stats/colorize.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/port_stats/colorize.py b/port_stats/colorize.py index eb3fd3a..ccabe53 100644 --- a/port_stats/colorize.py +++ b/port_stats/colorize.py @@ -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'