[Collab-qa-commits] r634 - ddpo-by-mail
lucas at alioth.debian.org
lucas at alioth.debian.org
Wed Jan 9 23:42:14 UTC 2008
Author: lucas
Date: 2008-01-09 23:42:14 +0000 (Wed, 09 Jan 2008)
New Revision: 634
Modified:
ddpo-by-mail/ddpo-config.rb
ddpo-by-mail/reminder-mail.rb
Log:
- no longer use bts.tz.net. parse ldap dump instead.
- improved wording for not-in-testing
- minor config changes for january run
Modified: ddpo-by-mail/ddpo-config.rb
===================================================================
--- ddpo-by-mail/ddpo-config.rb 2008-01-09 23:40:13 UTC (rev 633)
+++ ddpo-by-mail/ddpo-config.rb 2008-01-09 23:42:14 UTC (rev 634)
@@ -42,8 +42,9 @@
SENDMAIL = true
WRITEDDLIST = true
WRITEPCLIST = true
-BUG_AGE = 21
-LAST_IN_TESTING = 40
-LAST_IN_SYNC = 60
+BUG_AGE = 20
+#LAST_IN_TESTING = 40
+AGE_IN_DEBIAN = 25
+LAST_IN_SYNC = 50
# etch released on 2007-04-08. So
# (Date::today - Date::parse('2007-04-08')).to_i
Modified: ddpo-by-mail/reminder-mail.rb
===================================================================
--- ddpo-by-mail/reminder-mail.rb 2008-01-09 23:40:13 UTC (rev 633)
+++ ddpo-by-mail/reminder-mail.rb 2008-01-09 23:42:14 UTC (rev 634)
@@ -8,6 +8,7 @@
#IGNFIXED=""
def update_data
system("rm -f buglist ddpo_packages ddpo_maintainers popcon_by_inst")
+ system("wget -q -O bts2ldap_fullindex http://qa.debian.org/data/bts2ldap/fullindex")
system("wget -q -O buglist 'http://bts.turmzimmer.net/details.php?bydist=sid&sortby=packages&ignnew=on#{IGNFIXED}&new=#{BUG_AGE}&refresh=1800'")
system("wget -q -O ddpo_packages http://qa.debian.org/data/ddpo/results/ddpo_packages")
system("wget -q -O ddpo_maintainers http://qa.debian.org/data/ddpo/results/ddpo_maintainers")
@@ -18,7 +19,7 @@
# parse debian-installer packages
pkg = nil
dipkgs = []
-`zcat /org/ftp.debian.org/ftp/dists/unstable/main/debian-installer/binary-i386/Packages.gz`.each_line do |l|
+`zcat /org/ftp.debian.org/ftp/dists/unstable/main/debian-installer/binary-*/Packages.gz`.each_line do |l|
if l =~ /^Package: /
if pkg != nil
dipkgs << pkg
@@ -29,6 +30,7 @@
pkg = nil
end
end
+dipkgs.uniq!
# parse testing status
require 'date'
@@ -37,41 +39,83 @@
pts = PkgTestingStatus::read(File::new(file,'r')).reject { |k,v| v.inunstable != now }
# parse buglist
-pkgs = IO::read('buglist').match(/<pre>(.*)<\/pre>/m)[1].split(/\n\n/)
-bugs = Hash::new { [] }
-nb = 0
-bug = []
-bugtitle = {}
-pkgs.each do |p|
- curpkg = nil
- pbug = []
- p.each_line do |l|
- if l =~ /^<strong>/ or l =~ /<span class="wnpp"><strong>/
- curpkg = l.match(/ name="([^"]*)">/)[1]
- elsif l =~ /^<span class="comment">/
- # do nothing
- else
- b = l.match(/ name="([^"]*)">/)[1]
- if EXC_BUGS.include?(b)
- puts "Skipping #{b}, it is excluded."
- next
- end
- # skip if fixed in new
- next if l =~ /(<a href="http:\/\/ftp-master.debian.org\/new.html">fixed in NEW<\/a>)/
- pbug << b
- # cleanup
- l = l.gsub(/ \(<a href="http:\/\/bjorn.haxx.se\/debian\/testing.pl\?package=.*">Removal requested by \w+<\/a>\)/,'')
- # get the bug title
- bugtitle[b] = l.gsub(/^[^\]]*\] ([^<]*)(<\/span>)?$/, '\1')
+bugs = {}
+bugtitles = {}
+maxtime = Time::now.to_i - BUG_AGE * 86400
+
+bugid = nil
+bugsrcpkg = nil
+bugpkg = nil
+bugseverity = nil
+bugtitle = nil
+bugstate = nil
+bugdone = false
+bugdate = nil
+bugtags = []
+bugaffect = []
+bugmerged = []
+
+IO::read('bts2ldap_fullindex').each_line do |l|
+ l.chomp!
+ key, val = l.split(' ', 2)
+ if key == 'dn:' and bugid != nil
+ obugtags = bugtags
+ obugaffect = bugaffect
+ obugmerged = bugmerged
+ obugdone = bugdone
+ obugsrcpkg = bugsrcpkg
+ obugpkg = bugpkg
+
+ bugsrcpkg = nil
+ bugpkg = nil
+ bugdone = false
+ bugtags = []
+ bugaffect = []
+ bugmerged = []
+ # where we classify bugs.
+ next if bugdate > maxtime
+ next if not ['serious', 'grave', 'critical'].include?(bugseverity)
+ next if not obugmerged.empty?
+ next if not obugaffect.include?('unstable')
+ if EXC_BUGS.include?(bugid)
+ puts "Skipping #{bugid}, it is excluded."
+ next
end
- bugs[curpkg] = pbug unless curpkg.nil?
- bug += pbug
- nb += pbug.length
+
+ bugtitles[bugid] = bugtitle
+ if obugsrcpkg.nil?
+ obugsrcpkg = obugpkg
+ end
+ bugs[obugsrcpkg] = [] if bugs[obugsrcpkg].nil?
+ bugs[obugsrcpkg] << bugid
+
+ elsif key == 'debbugsID:'
+ bugid = val.to_i
+ elsif key== 'debbugsPackage:'
+ bugpkg = val
+ elsif key== 'debbugsSourcePackage:'
+ bugsrcpkg = val
+ elsif key == 'debbugsDone:'
+ bugdone = true
+ elsif key == 'debbugsSeverity:'
+ bugseverity = val
+ elsif key == 'debbugsTag:'
+ bugtags << val
+ elsif key == 'debbugsState:'
+ bugstate = val
+ elsif key == 'debbugsTitle:'
+ bugtitle = val
+ elsif key == 'debbugsAffected:'
+ bugaffect << val
+ elsif key == 'debbugsMergedWith:'
+ bugmerged << val
+ elsif key == 'debbugsDate:'
+ bugdate = val.to_i
end
end
-STDERR.puts "Bugs: #{nb} / unified: #{bug.uniq.length}"
-STDERR.puts "Packages: #{pkgs.length}"
+p bugs
+
# Parse ddpo_packages
pkgs = Hash::new { [] }
f = IO::read("ddpo_packages")
@@ -136,11 +180,11 @@
next
end
pissues = []
- if bugs[p].length > 0
+ if bugs[p] != nil
pissues << [ :rc_bugs, bugs[p] ]
end
if pts[p]
- ok, days = pts[p].testing_ok?(LAST_IN_TESTING)
+ ok, days = pts[p].testing_ok?(AGE_IN_DEBIAN)
if not ok
if dipkgs.include?(p)
puts "Ignoring the fact that #{p} is not in testing (contains udebs)"
@@ -200,20 +244,25 @@
end
ptext = "=== #{p}:#{comaint}\n"
bjorn = false
+ days = nil
issues[p].each do |iss|
if iss[0] == :rc_bugs
ptext += "= This package has #{iss[1].length} RC bug(s) more than #{BUG_AGE} days old:\n"
iss[1].each do |b|
ptext += "- ##{b} <http://bugs.debian.org/#{b}>\n"
- ptext += " #{bugtitle[b]}\n"
+ ptext += " #{bugtitles[b]}\n"
end
elsif iss[0] == :not_testing
ptext += "= This package has not been in testing for #{iss[1]} days.\n"
+ ptext += " If things don't change, it won't be part of lenny!\n"
bjorn = true
+ days = iss[1]
elsif iss[0] == :no_migration
- ptext += "= This package has not been able to migrate from unstable\n"
- ptext += " to testing for #{iss[1]} days.\n"
- bjorn = true
+ if days != iss[1]
+ ptext += "= This package has not been able to migrate from unstable\n"
+ ptext += " to testing for #{iss[1]} days.\n"
+ bjorn = true
+ end
end
end
if bjorn
@@ -282,7 +331,7 @@
Here is a list (sorted by maintainer email) of packages:
- that have RC bugs older than #{BUG_AGE} days.
-- that have not been in testing for more than #{LAST_IN_TESTING} days.
+- that are not currently in testing.
- that have not migrated from unstable to testing for more than #{LAST_IN_SYNC} days.
(U) after the package means "Uploader", as with dd-list.
More information about the Collab-qa-commits
mailing list