public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mart Raudsepp" <leio@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bumpchecker:master commit in: modules/
Date: Tue, 21 Mar 2017 02:57:24 +0000 (UTC)	[thread overview]
Message-ID: <1490064865.e3e72ec761ab556f62b272a226b48726dab5cfde.leio@gentoo> (raw)

commit:     e3e72ec761ab556f62b272a226b48726dab5cfde
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 21 02:54:25 2017 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Tue Mar 21 02:54:25 2017 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-bumpchecker.git/commit/?id=e3e72ec7

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.

 modules/gnome_module.py   | 5 ++++-
 modules/package_module.py | 8 ++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

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))


             reply	other threads:[~2017-03-21  2:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  2:57 Mart Raudsepp [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
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: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=1490064865.e3e72ec761ab556f62b272a226b48726dab5cfde.leio@gentoo \
    --to=leio@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