public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
@ 2012-06-04  9:18 Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-06-04  9:18 UTC (permalink / raw
  To: gentoo-commits

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)



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
  2012-10-08 16:03 Paweł Hajdan
@ 2012-08-01  7:16 ` Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-08-01  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     f63c885b61c46482781e22fb6f117f110eada79d
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 07:15:43 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 07:15:43 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=f63c885b

Add default exclusion regex to the script

This makes it harder to forget exclusions people
asked for.

---
 stabilization-candidates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index a5724ff..bf7825e 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -24,7 +24,7 @@ if __name__ == "__main__":
 	parser.add_option("--days", dest="days", type=int, default=30, help="Number of days in the tree after stabilization is possible.")
 	parser.add_option("--repo", dest="repo", help="Path to portage CVS repository")
 	parser.add_option("--category", dest="category", help="Portage category filter (default is all categories)")
-	parser.add_option("--exclude", dest="exclude", help="Regular expression for excluded packages.")
+	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby).*", help="Regular expression for excluded packages.")
 	parser.add_option("--file-bugs", dest="file_bugs", action="store_true", default=False, help="File stabilization bugs for detected candidates. Otherwise (default) the candidates are just displayed.")
 
 	(options, args) = parser.parse_args()


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
  2012-10-08 16:03 [gentoo-commits] proj/arch-tools:master " Paweł Hajdan
@ 2012-08-01  7:16 ` Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-08-01  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     64ebf043ef6bd7481b3701a6e69735ca618fd2f9
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 07:11:49 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 07:11:49 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=64ebf043

Fix an exception when best_version was not a string

---
 stabilization-candidates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index 77a9a74..a5724ff 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -89,7 +89,7 @@ if __name__ == "__main__":
 		# 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]
+		best_candidate = str(candidates[0])
 
 		pv = portage.versions.catsplit(best_candidate)[1]
 		try:


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
@ 2012-08-01  7:28 Paweł Hajdan
  2012-10-08 16:03 ` [gentoo-commits] proj/arch-tools:master " Paweł Hajdan
  0 siblings, 1 reply; 7+ messages in thread
From: Paweł Hajdan @ 2012-08-01  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     5ff852b4a383456e6a9be6918f289eaa40cc0f64
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 07:28:10 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 07:28:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=5ff852b4

Also exclude x11 from stabilization candidates.

---
 stabilization-candidates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index bf7825e..3268fdc 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -24,7 +24,7 @@ if __name__ == "__main__":
 	parser.add_option("--days", dest="days", type=int, default=30, help="Number of days in the tree after stabilization is possible.")
 	parser.add_option("--repo", dest="repo", help="Path to portage CVS repository")
 	parser.add_option("--category", dest="category", help="Portage category filter (default is all categories)")
-	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby).*", help="Regular expression for excluded packages.")
+	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby|x11).*", help="Regular expression for excluded packages.")
 	parser.add_option("--file-bugs", dest="file_bugs", action="store_true", default=False, help="File stabilization bugs for detected candidates. Otherwise (default) the candidates are just displayed.")
 
 	(options, args) = parser.parse_args()


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
@ 2012-08-01 11:08 Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-08-01 11:08 UTC (permalink / raw
  To: gentoo-commits

commit:     47a90a979384faa62dac5190aa2515b6e67c3150
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 11:07:53 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 11:07:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=47a90a97

Exclude mono/dotnet from stabilization candidates.

---
 stabilization-candidates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index 3268fdc..216e15f 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -24,7 +24,7 @@ if __name__ == "__main__":
 	parser.add_option("--days", dest="days", type=int, default=30, help="Number of days in the tree after stabilization is possible.")
 	parser.add_option("--repo", dest="repo", help="Path to portage CVS repository")
 	parser.add_option("--category", dest="category", help="Portage category filter (default is all categories)")
-	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby|x11).*", help="Regular expression for excluded packages.")
+	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby|x11|mono|dotnet).*", help="Regular expression for excluded packages.")
 	parser.add_option("--file-bugs", dest="file_bugs", action="store_true", default=False, help="File stabilization bugs for detected candidates. Otherwise (default) the candidates are just displayed.")
 
 	(options, args) = parser.parse_args()


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:new-pybugz commit in: /
@ 2012-10-08 16:02 Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-10-08 16:02 UTC (permalink / raw
  To: gentoo-commits

commit:     08d0025e085923f23e02e4f6009a651d7d7619b7
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  8 16:01:18 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Mon Oct  8 16:01:18 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=08d0025e

More robust commit logic:

- do not overwrite own changes when stabilizing multiple versions of the
  same package
- ignore unrelated failures on other arches

---
 batch-stabilize.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/batch-stabilize.py b/batch-stabilize.py
index bede303..c7b676f 100755
--- a/batch-stabilize.py
+++ b/batch-stabilize.py
@@ -138,6 +138,9 @@ if __name__ == "__main__":
 					if run_command(["cvs", "up", pn], options.repo, log_file)[0] != 0:
 						print '!!! cvs up failed'
 						sys.exit(1)
+				for (pn, ebuild_name) in stabilization_dict[bug_id]:
+					cvs_path = os.path.join(options.repo, pn)
+					print_and_log('Working in %s...' % cvs_path, log_file)
 					if run_command(["ekeyword", options.arch, ebuild_name], cvs_path, log_file)[0] != 0:
 						print '!!! ekeyword failed'
 						sys.exit(1)
@@ -159,7 +162,7 @@ if __name__ == "__main__":
 					if run_command(["repoman", "manifest"], cvs_path, log_file)[0] != 0:
 						print '!!! repoman manifest failed'
 						sys.exit(1)
-					if run_command(["repoman", "commit", "-m", commit_message], cvs_path, log_file)[0] != 0:
+					if run_command(["repoman", "commit", "--ignore-arches", "-m", commit_message], cvs_path, log_file)[0] != 0:
 						print '!!! repoman commit failed'
 						sys.exit(1)
 				params = {}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/arch-tools:master commit in: /
  2012-08-01  7:28 [gentoo-commits] proj/arch-tools:new-pybugz commit in: / Paweł Hajdan
@ 2012-10-08 16:03 ` Paweł Hajdan
  0 siblings, 0 replies; 7+ messages in thread
From: Paweł Hajdan @ 2012-10-08 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     5ff852b4a383456e6a9be6918f289eaa40cc0f64
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 07:28:10 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 07:28:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=5ff852b4

Also exclude x11 from stabilization candidates.

---
 stabilization-candidates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index bf7825e..3268fdc 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -24,7 +24,7 @@ if __name__ == "__main__":
 	parser.add_option("--days", dest="days", type=int, default=30, help="Number of days in the tree after stabilization is possible.")
 	parser.add_option("--repo", dest="repo", help="Path to portage CVS repository")
 	parser.add_option("--category", dest="category", help="Portage category filter (default is all categories)")
-	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby).*", help="Regular expression for excluded packages.")
+	parser.add_option("--exclude", dest="exclude", default=".*(kde|sci|lisp|perl-core|virtual|gnome|ruby|x11).*", help="Regular expression for excluded packages.")
 	parser.add_option("--file-bugs", dest="file_bugs", action="store_true", default=False, help="File stabilization bugs for detected candidates. Otherwise (default) the candidates are just displayed.")
 
 	(options, args) = parser.parse_args()


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-08 16:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01  7:28 [gentoo-commits] proj/arch-tools:new-pybugz commit in: / Paweł Hajdan
2012-10-08 16:03 ` [gentoo-commits] proj/arch-tools:master " Paweł Hajdan
  -- strict thread matches above, loose matches on Subject: below --
2012-10-08 16:03 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
2012-10-08 16:02 Paweł Hajdan
2012-08-01 11:08 Paweł Hajdan
2012-06-04  9:18 Paweł Hajdan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox