commit: 99858410eb2f1de5ac5926a52acb8ff94578b861
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 11 22:11:11 2021 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Dec 11 22:11:11 2021 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-bumpchecker.git/commit/?id=99858410
Add support for GNOME 40 in "Latest Version" column
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
modules/gnome_module.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/gnome_module.py b/modules/gnome_module.py
index 7280a16..a66d305 100644
--- a/modules/gnome_module.py
+++ b/modules/gnome_module.py
@@ -101,11 +101,15 @@ class GNOME:
if data[0] != 4:
print("Warning: unknown cache.json version for package %s" %
name)
continue
- if pkg.major_minor not in data[3]:
- print("Warning: can't find latest version for %s-%s" % (name,
pkg.major_minor))
- continue
major_minor = pkg.major_minor
- if pkg.major != "0" and pkg.minor.isdigit() and int(pkg.minor) % 2
and "%s.%d" % (pkg.major, int(pkg.minor)+1) in data[3]:
+ new_versioning = False
+ if major_minor not in data[3]:
+ major_minor = pkg.major
+ new_versioning = True
+ if major_minor not in data[3]:
+ print("Warning: can't find latest version for %s-%s" %
(name, pkg.major_minor))
+ continue
+ if not new_versioning and pkg.major != "0" and pkg.minor.isdigit()
and int(pkg.minor) % 2 and "%s.%d" % (pkg.major, int(pkg.minor)+1) in data[3]:
major_minor = "%s.%d" % (pkg.major, int(pkg.minor)+1)
latest = False
# Some modules contain more than LATEST-IS-* for some reason, so
we need to iterate and find the correct item instead of [0] (even though it is
firsy always, but lets be future-proof)