summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2017-03-21 04:54:25 +0200
committerMart Raudsepp <leio@gentoo.org>2017-03-21 04:54:25 +0200
commite3e72ec761ab556f62b272a226b48726dab5cfde (patch)
treec594d7c33603667a1e03f08b9134ffc20bd281ba
parentgnome: Stop skipping mobile suite, as it doesn't exist anymore anyway (diff)
downloadgentoo-bumpchecker-e3e72ec761ab556f62b272a226b48726dab5cfde.tar.gz
gentoo-bumpchecker-e3e72ec761ab556f62b272a226b48726dab5cfde.tar.bz2
gentoo-bumpchecker-e3e72ec761ab556f62b272a226b48726dab5cfde.zip
gnome: Hack latest version to see newstable release when official version is still at release candidate
When running against e.g 3.23.92 release before a 3.24.0 versions file from gnome releng exists to run against, we want to still see the 3.24.0 releases, should any exist. So hack the logic to look into latest newstable version, if any exist, and the version is not a 0.x (for which the gnome numbering might not follow odd-even nomenclature). Without this all the 3.24.0 releases that are coming out on "tarballs due" date and the preceeding weekend aren't seen by bumpchecker, as we don't have a 3.24.0 to -r <ver> against.
-rw-r--r--modules/gnome_module.py5
-rw-r--r--modules/package_module.py8
2 files changed, 12 insertions, 1 deletions
diff --git a/modules/gnome_module.py b/modules/gnome_module.py
index 38639ee..a9fd306 100644
--- a/modules/gnome_module.py
+++ b/modules/gnome_module.py
@@ -96,9 +96,12 @@ class GNOME:
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]:
+ 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)
- for tarball in data[3][pkg.major_minor]:
+ for tarball in data[3][major_minor]:
if tarball.startswith('LATEST-IS-'):
latest = tarball[10:] # len('LATEST-IS-') == 10
break
diff --git a/modules/package_module.py b/modules/package_module.py
index 30f79a2..e967973 100644
--- a/modules/package_module.py
+++ b/modules/package_module.py
@@ -82,6 +82,14 @@ class Package(object):
def parse_mm(self, version):
return '.'.join(version.split('.')[0:2])
+ @property
+ def major(self):
+ return self.major_minor.split('.')[0]
+
+ @property
+ def minor(self):
+ return self.major_minor.split('.')[1]
+
def print_info(self):
print("Name: " + str(self.name))
print("Version: " + str(self.package_version))