From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bumpchecker:master commit in: modules/
Date: Wed, 14 Apr 2021 22:57:43 +0000 (UTC) [thread overview]
Message-ID: <1618441053.3f300c8204a90fdbe3f9cee98b16d880dc5442e7.mattst88@gentoo> (raw)
commit: 3f300c8204a90fdbe3f9cee98b16d880dc5442e7
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 14 22:52:27 2021 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 14 22:57:33 2021 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bumpchecker.git/commit/?id=3f300c82
Add support for GNOME 40
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
modules/gnome_module.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/gnome_module.py b/modules/gnome_module.py
index 7ef3b12..7a2f5ed 100644
--- a/modules/gnome_module.py
+++ b/modules/gnome_module.py
@@ -28,6 +28,13 @@ name_mapping = {
"gnome-themes-standard": "gnome-themes-extra",
}
+# Turns GNOME versions (40.beta) into the PMS version format (40_beta)
+def normalize_version(version: str) -> str:
+ if version.endswith(('.rc', '.beta', '.alpha')):
+ i = version.rindex('.')
+ return f"{version[:i]}_{version[i + 1:]}"
+ return version
+
class GNOME:
def __init__(self, nextrev=False):
options = clioptions_module.Options()
@@ -40,7 +47,7 @@ class GNOME:
# gnome_release is the major release number the development is leading up to or is part of. E.g, 2.21.5 will turn to 2.22 and 2.22.2 becomes 2.22
# This is used in latest versions list fetching URL construction
gnome_release_list = args.release_number.split(".")
- if int(gnome_release_list[1]) % 2 != 0:
+ if int(gnome_release_list[0]) < 40 and int(gnome_release_list[1]) % 2 != 0:
gnome_release_list[1] = str(int(gnome_release_list[1]) + 1)
self.gnome_release = ".".join(gnome_release_list[:2])
@@ -64,7 +71,7 @@ class GNOME:
# Skip invalid lines
if len(components) != 4 or len(components[2]) == 0:
continue
- pkg = package_module.Package(components[1] + "-" + components[2], suite=components[0])
+ pkg = package_module.Package(components[1] + "-" + normalize_version(components[2]), suite=components[0])
if (pkg.name and pkg.version):
ret.append(pkg)
else:
@@ -109,7 +116,7 @@ class GNOME:
if not latest:
print("Warning: couldn't find latest version from within cache.json[3]")
continue
- latest_pkg = package_module.Package(name + "-" + latest)
+ latest_pkg = package_module.Package(name + "-" + normalize_version(latest))
if pkg.name and pkg.version:
ret.append(latest_pkg)
else:
next reply other threads:[~2021-04-14 22:57 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 22:57 Matt Turner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-16 20:16 [gentoo-commits] proj/gentoo-bumpchecker:master commit in: modules/ Mart Raudsepp
2022-03-27 4:48 Matt Turner
2021-12-11 22:11 Mart Raudsepp
2021-04-14 22:57 Matt Turner
2019-08-24 16:38 Mart Raudsepp
2019-03-26 13:33 Mart Raudsepp
2019-01-16 0:27 Mart Raudsepp
2017-10-31 23:12 Mart Raudsepp
2017-03-21 2:57 Mart Raudsepp
2017-03-21 2:29 Mart Raudsepp
2017-03-21 2:29 Mart Raudsepp
2017-03-21 2:29 Mart Raudsepp
2017-03-21 1:59 Mart Raudsepp
2017-03-21 1:59 Mart Raudsepp
2017-03-20 23:12 Mart Raudsepp
2017-03-11 14:09 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2017-03-03 23:50 Mart Raudsepp
2012-11-21 23:42 Gilles Dartiguelongue
2011-09-04 19:27 Mart Raudsepp
2011-06-07 16:36 Nirbheek Chauhan
2011-03-26 2:59 Nirbheek Chauhan
2011-03-15 13:19 Tomas Chvatal
2011-02-20 21:03 Nirbheek Chauhan
2011-02-20 13:56 Tomas Chvatal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1618441053.3f300c8204a90fdbe3f9cee98b16d880dc5442e7.mattst88@gentoo \
--to=mattst88@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox