From: "Paweł Hajdan" <phajdan.jr@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/arch-tools:new-pybugz commit in: / Date: Mon, 4 Jun 2012 09:18:18 +0000 (UTC) [thread overview] Message-ID: <1338801472.b619bbaa42d55cb7eb424cecd9b3f0d4a8318917.phajdan.jr@gentoo> (raw) commit: b619bbaa42d55cb7eb424cecd9b3f0d4a8318917 Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> AuthorDate: Mon Jun 4 09:17:52 2012 +0000 Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org> CommitDate: Mon Jun 4 09:17:52 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=b619bbaa Improve stabilization-candidates (misc updates) --- stabilization-candidates.py | 52 ++++++++++++++++++++++++------------------ 1 files changed, 30 insertions(+), 22 deletions(-) diff --git a/stabilization-candidates.py b/stabilization-candidates.py index 7989a84..77a9a74 100755 --- a/stabilization-candidates.py +++ b/stabilization-candidates.py @@ -8,6 +8,7 @@ import os.path import random import re import subprocess +import xmlrpclib import urllib from bugz.bugzilla import BugzillaProxy @@ -91,16 +92,20 @@ if __name__ == "__main__": 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: - print 'error parsing ChangeLog' - continue - changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') - if now - changelog_date < datetime.timedelta(days=options.days): - print 'not old enough' - continue + try: + 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: + print 'error parsing ChangeLog' + continue + changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') + if now - changelog_date < datetime.timedelta(days=options.days): + print 'not old enough' + continue + except IOError, e: + print e + continue keywords = portage.db["/"]["porttree"].dbapi.aux_get(best_candidate, ['KEYWORDS'])[0] missing_arch = False @@ -113,18 +118,15 @@ if __name__ == "__main__": continue # Do not risk trying to stabilize a package with known bugs. - params = {} - params['summary'] = [cp]; - bugs = bugzilla.Bug.search(params) - if len(bugs['bugs']): + bugs = [x for x in bugzilla.Bug.search({'summary': cp})['bugs'] if x['is_open'] and x['severity'] not in ['enhancement', 'QA']] + if bugs: print 'has bugs' continue # Protection against filing a stabilization bug twice. - params['summary'] = [best_candidate] - bugs = bugzilla.Bug.search(params) - if len(bugs['bugs']): - print 'version has closed bugs' + bugs = bugzilla.Bug.search({'summary': best_candidate})['bugs'] + if bugs: + print 'version has bugs' continue cvs_path = os.path.join(options.repo, cp) @@ -164,8 +166,10 @@ if __name__ == "__main__": if options.file_bugs: description = ('Is it OK to stabilize =%s ?\n\n' % best_candidate + - 'If so, please CC arches and add STABLEREQ keyword.\n\n' + - 'Stabilization of this package has been repoman-checked on the following arches: %s' % ', '.join(options.arch)) + 'If so, please CC all arches which have stable keywords\n\n' + + 'for older versions of this package and add STABLEREQ keyword\n\n' + + 'to the bug.') + params = {} params['product'] = 'Gentoo Linux' params['version'] = 'unspecified' params['component'] = 'Keywording and Stabilization' @@ -175,7 +179,11 @@ if __name__ == "__main__": params['assigned_to'] = maintainer params['cc'] = other_maintainers params['severity'] = 'enhancement' - bug_id = bugzilla.Bug.create(params)['id'] - print 'Submitted bug #%d for %s. ;-)' % (bug_id, best_candidate) + try: + bug_id = bugzilla.Bug.create(params)['id'] + print 'Submitted bug #%d for %s. ;-)' % (bug_id, best_candidate) + except xmlrpclib.Fault, f: + print f + print 'Failed to submit bug for %s. :-(' % best_candidate else: print (best_candidate, maintainer, other_maintainers)
WARNING: multiple messages have this Message-ID (diff)
From: "Paweł Hajdan" <phajdan.jr@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/arch-tools:master commit in: / Date: Mon, 8 Oct 2012 16:03:19 +0000 (UTC) [thread overview] Message-ID: <1338801472.b619bbaa42d55cb7eb424cecd9b3f0d4a8318917.phajdan.jr@gentoo> (raw) Message-ID: <20121008160319.vu9zuy18EasXN7Nk7_jiK6LFh_jEmRtBAPuZJylms0g@z> (raw) commit: b619bbaa42d55cb7eb424cecd9b3f0d4a8318917 Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> AuthorDate: Mon Jun 4 09:17:52 2012 +0000 Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org> CommitDate: Mon Jun 4 09:17:52 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=b619bbaa Improve stabilization-candidates (misc updates) --- stabilization-candidates.py | 52 ++++++++++++++++++++++++------------------ 1 files changed, 30 insertions(+), 22 deletions(-) diff --git a/stabilization-candidates.py b/stabilization-candidates.py index 7989a84..77a9a74 100755 --- a/stabilization-candidates.py +++ b/stabilization-candidates.py @@ -8,6 +8,7 @@ import os.path import random import re import subprocess +import xmlrpclib import urllib from bugz.bugzilla import BugzillaProxy @@ -91,16 +92,20 @@ if __name__ == "__main__": 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: - print 'error parsing ChangeLog' - continue - changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') - if now - changelog_date < datetime.timedelta(days=options.days): - print 'not old enough' - continue + try: + 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: + print 'error parsing ChangeLog' + continue + changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') + if now - changelog_date < datetime.timedelta(days=options.days): + print 'not old enough' + continue + except IOError, e: + print e + continue keywords = portage.db["/"]["porttree"].dbapi.aux_get(best_candidate, ['KEYWORDS'])[0] missing_arch = False @@ -113,18 +118,15 @@ if __name__ == "__main__": continue # Do not risk trying to stabilize a package with known bugs. - params = {} - params['summary'] = [cp]; - bugs = bugzilla.Bug.search(params) - if len(bugs['bugs']): + bugs = [x for x in bugzilla.Bug.search({'summary': cp})['bugs'] if x['is_open'] and x['severity'] not in ['enhancement', 'QA']] + if bugs: print 'has bugs' continue # Protection against filing a stabilization bug twice. - params['summary'] = [best_candidate] - bugs = bugzilla.Bug.search(params) - if len(bugs['bugs']): - print 'version has closed bugs' + bugs = bugzilla.Bug.search({'summary': best_candidate})['bugs'] + if bugs: + print 'version has bugs' continue cvs_path = os.path.join(options.repo, cp) @@ -164,8 +166,10 @@ if __name__ == "__main__": if options.file_bugs: description = ('Is it OK to stabilize =%s ?\n\n' % best_candidate + - 'If so, please CC arches and add STABLEREQ keyword.\n\n' + - 'Stabilization of this package has been repoman-checked on the following arches: %s' % ', '.join(options.arch)) + 'If so, please CC all arches which have stable keywords\n\n' + + 'for older versions of this package and add STABLEREQ keyword\n\n' + + 'to the bug.') + params = {} params['product'] = 'Gentoo Linux' params['version'] = 'unspecified' params['component'] = 'Keywording and Stabilization' @@ -175,7 +179,11 @@ if __name__ == "__main__": params['assigned_to'] = maintainer params['cc'] = other_maintainers params['severity'] = 'enhancement' - bug_id = bugzilla.Bug.create(params)['id'] - print 'Submitted bug #%d for %s. ;-)' % (bug_id, best_candidate) + try: + bug_id = bugzilla.Bug.create(params)['id'] + print 'Submitted bug #%d for %s. ;-)' % (bug_id, best_candidate) + except xmlrpclib.Fault, f: + print f + print 'Failed to submit bug for %s. :-(' % best_candidate else: print (best_candidate, maintainer, other_maintainers)
next reply other threads:[~2012-06-04 9:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-04 9:18 Paweł Hajdan [this message] 2012-10-08 16:03 ` [gentoo-commits] proj/arch-tools:master commit in: / Paweł Hajdan -- strict thread matches above, loose matches on Subject: below -- 2012-08-01 7:28 [gentoo-commits] proj/arch-tools:new-pybugz " Paweł Hajdan 2012-08-01 11:08 Paweł Hajdan 2012-10-08 16:02 Paweł Hajdan 2012-10-08 16:03 [gentoo-commits] proj/arch-tools:master " Paweł Hajdan 2012-08-01 7:16 ` [gentoo-commits] proj/arch-tools:new-pybugz " Paweł Hajdan 2012-10-08 16:03 [gentoo-commits] proj/arch-tools:master " Paweł Hajdan 2012-08-01 7:16 ` [gentoo-commits] proj/arch-tools:new-pybugz " Paweł Hajdan
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=1338801472.b619bbaa42d55cb7eb424cecd9b3f0d4a8318917.phajdan.jr@gentoo \ --to=phajdan.jr@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: linkBe 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