diff options
author | Mart Raudsepp <leio@gentoo.org> | 2021-12-12 00:11:11 +0200 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2021-12-12 00:11:11 +0200 |
commit | 99858410eb2f1de5ac5926a52acb8ff94578b861 (patch) | |
tree | 3b9e2327ef0afc5153e40c18f9e83e99ba196e1d | |
parent | Fix some bad Python (diff) | |
download | gentoo-bumpchecker-99858410eb2f1de5ac5926a52acb8ff94578b861.tar.gz gentoo-bumpchecker-99858410eb2f1de5ac5926a52acb8ff94578b861.tar.bz2 gentoo-bumpchecker-99858410eb2f1de5ac5926a52acb8ff94578b861.zip |
Add support for GNOME 40 in "Latest Version" column
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
-rw-r--r-- | modules/gnome_module.py | 12 |
1 files 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) |