diff options
author | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2011-12-01 19:46:56 +0100 |
---|---|---|
committer | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2011-12-01 19:46:56 +0100 |
commit | ed362d1d47dd71a7deb1610cd1178305522339ac (patch) | |
tree | 439977c9e0ff4f1d80bb18cfd98055c097f39238 | |
parent | Do not file bugs by default, and only stabilze latest version in ~arch. (diff) | |
download | arch-tools-ed362d1d47dd71a7deb1610cd1178305522339ac.tar.gz arch-tools-ed362d1d47dd71a7deb1610cd1178305522339ac.tar.bz2 arch-tools-ed362d1d47dd71a7deb1610cd1178305522339ac.zip |
Really only consider latest version in ~arch.
-rwxr-xr-x | stabilization-candidates.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stabilization-candidates.py b/stabilization-candidates.py index 8feee30..d2e539c 100755 --- a/stabilization-candidates.py +++ b/stabilization-candidates.py @@ -80,16 +80,6 @@ if __name__ == "__main__": if getmaskingstatus(cpv) not in [[u'~%s keyword' % arch] for arch in options.arch]: continue - pv = portage.versions.catsplit(cpv)[1] - with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file: - regex = '\*%s \((.*)\)' % re.escape(pv) - match = re.search(regex, changelog_file.read()) - if not match: - continue - changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') - if now - changelog_date < datetime.timedelta(days=options.days): - continue - candidates.append(cpv) if not candidates: continue @@ -97,11 +87,21 @@ if __name__ == "__main__": candidates.sort(key=portage.versions.cpv_sort_key()) candidates.reverse() - # Only consider the best version in ~arch for stabilization. + # Only consider the best version for stabilization. # It's usually better tested, and often maintainers refuse # to stabilize anything else, e.g. bug #391607. best_candidate = candidates[0] + pv = portage.versions.catsplit(best_candidate)[1] + with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file: + regex = '\*%s \((.*)\)' % re.escape(pv) + match = re.search(regex, changelog_file.read()) + if not match: + continue + changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') + if now - changelog_date < datetime.timedelta(days=options.days): + continue + cvs_path = os.path.join(options.repo, cp) ebuild_name = portage.versions.catsplit(best_candidate)[1] + ".ebuild" ebuild_path = os.path.join(cvs_path, ebuild_name) |