[Collab-qa-commits] r879 - ddpo-by-mail

lucas at alioth.debian.org lucas at alioth.debian.org
Thu Jun 5 12:25:29 UTC 2008


Author: lucas
Date: 2008-06-05 12:25:28 +0000 (Thu, 05 Jun 2008)
New Revision: 879

Modified:
   ddpo-by-mail/ddpo-config.rb
   ddpo-by-mail/reminder-mail.rb
   ddpo-by-mail/testingissues.rb
   ddpo-by-mail/update-data.rb
Log:
Less verbose output.
Add per-email bug-ignroes.
Also send to PTS subscribers.


Modified: ddpo-by-mail/ddpo-config.rb
===================================================================
--- ddpo-by-mail/ddpo-config.rb	2008-06-05 08:55:46 UTC (rev 878)
+++ ddpo-by-mail/ddpo-config.rb	2008-06-05 12:25:28 UTC (rev 879)
@@ -1,9 +1,6 @@
 # Globally excluded packages
 EXC_PKGS = [
 'hurd', # only exist on hurd-i386, which isn't a testing arch, so that's OK
-'gnumach',
-'mig',
-'ingimp'
 ]
 
 # Maintainers who unsubscribed, or dummy maintainers
@@ -28,18 +25,13 @@
   'pkg-grub-devel at lists.alioth.debian.org'
 ]
 
-EXC_BUGS = [
-  '368560', # debian-x at lists.debian.org
-  '368559',
-  '211765',
-  '368564',
-  '383465',
-  '429023', # ivan-debian at 420.am
-  '444204', # broonie at debian.org
-  '444543',
-  '432658' # monotone-debian at nongnu.org
+EXC_BUGS = [ ] # use EXC_EMAILS_BUGS, unless it's a false positive.
 
-]
+EXC_EMAILS_BUGS = Hash::new { [] }
+EXC_EMAILS_BUGS['debian-x at lists.debian.org'] = [ '368560', '368559', '211765', '368564', '383465' ]
+EXC_EMAILS_BUGS['ivan-debian at 420.am'] = [ '429023' ]
+EXC_EMAILS_BUGS['broonie at debian.org'] = [ '444204', '444543' ]
+EXC_EMAILS_BUGS['monotone-debian at nongnu.org'] = ['432658']
 
 EXC_EMAILS_PKGS = Hash::new { [] }
 EXC_EMAILS_PKGS['debian-gcc at lists.debian.org'] = ['gcc-2.95', 'gcc-snapshot' ]
@@ -48,6 +40,7 @@
 EXC_EMAILS_PKGS['daniel at debian.org'] = ['live-installer', 'iceweasel-l10n' ]
 EXC_EMAILS_PKGS['pkg-xen-devel at lists.alioth.debian.org'] = ['xen-unstable']
 EXC_EMAILS_PKGS['tomasera at debian.org'] = ['xinetd']
+EXC_EMAILS_PKGS['francois at debian.org'] = ['ingimp']
 
 BUG_AGE = 7
 AGE_IN_DEBIAN = 20

Modified: ddpo-by-mail/reminder-mail.rb
===================================================================
--- ddpo-by-mail/reminder-mail.rb	2008-06-05 08:55:46 UTC (rev 878)
+++ ddpo-by-mail/reminder-mail.rb	2008-06-05 12:25:28 UTC (rev 879)
@@ -46,6 +46,21 @@
   maintainers_name[email] = realname
 end
 
+# read PTS subscribers
+subscribers = Hash::new { [] }
+f = IO::read('pts_subscriptions.txt')
+f.each_line do |l|
+  l.chomp!
+  pkg, subs = l.split(/\t/, 2)
+  subs.split(/\, /).each do |s|
+    if subscribers[s].length > 0
+      subscribers[s] << pkg
+    else
+      subscribers[s] = [ pkg ]
+    end
+  end
+end
+
 # Get maintainer for each package
 haslist = {}
 maintainers_pkg.keys.each do |email|
@@ -109,45 +124,67 @@
 
 puts "Preparing mail for each maintainer..."
 # prepare mail for each maintainer
-maintainers_pkg.keys.sort.each do |email|
+(maintainers_pkg.keys + subscribers.keys).sort.uniq.each do |email|
   mpkgs = {}
+  maintained = {}
   mserious = false
   only_uploader = true # all the packages are about co-maintained packages
   if email =~ /@list.*\.debian\.org$/
     only_uploader = false # if sending to a list, send anyway
   end
-  gtext =<<-EOF
+  subscribers[email].each do |pkg|
+    maintained[pkg] = false
+  end
+  maintainers_pkg[email].each do |pkg|
+    if pkg =~ /#/
+      maintained[pkg.chop] = true
+      mpkgs[pkg.chop] = false
+    else
+      maintained[pkg] = true
+      mpkgs[pkg] = true
+    end
+  end
+  if maintainers_pkg[email].empty?
+    gtext =<<-EOF
 From: DDPOMail robot <lucas-ddpomail at debian.org>
 To: "#{maintainers_name[email]}" <#{email}>
 X-Debian: ddpomail
 Subject: Possible problems in your Debian packages
 
-  EOF
-  maintainers_pkg[email].each do |pkg|
-    if pkg =~ /#/
-      mpkgs[pkg.chop] = false
+    EOF
+  else
+    if maintainers_name[email] == ""
+      name = "PTS subscriber"
     else
-      mpkgs[pkg] = true
+      name = maintainers_name[email]
     end
+    gtext =<<-EOF
+From: DDPOMail robot <lucas-ddpomail at debian.org>
+To: "#{name}" <#{email}>
+X-Debian: ddpomail
+X-Debian: PTS 
+X-PTS-Keyword: summary
+Precedence: list
+Subject: Possible problems in Debian packages your monitor on the PTS
+
+    EOF
   end
-#  if email == 'pkg-ruby-extras-maintainers at lists.alioth.debian.org'
-#    p mpkgs
-#    mpkgs.keys.sort.each do |pkg|
-#      p issues[pkg]
-#    end
-#    exit 0
-#  end
+
   dehstext = ''
-  mpkgs.keys.sort.each do |pkg|
+  # iterate on all packages
+  (maintained.keys + mpkgs.keys).sort.uniq.each do |pkg|
     next if issues[pkg].nil?
     # skip if excluded
     next if EXC_EMAILS_PKGS[email].include?(pkg)
-    if not mpkgs[pkg]
+    if maintained[pkg] and not mpkgs[pkg]
       comaint = ' (you co-maintain it)'
       only_uploader = false if haslist[pkg].nil? and serious[pkg]
-    else
+    elsif maintained[pkg]
       comaint = ''
       only_uploader = false if serious[pkg]
+    else # not maintained[pkg]
+      comaint = ' (you are subscribed on the PTS)'
+      only_uploader = false if serious[pkg]
     end
     mserious = mserious || serious[pkg]
     ptext = "=== #{pkg}:#{comaint}\n"
@@ -155,9 +192,10 @@
     testingpl = false
     issues[pkg].each do |iss|
       if iss[0] == :bugs
+        bugs = iss[1].reject { |b| EXC_EMAILS_BUGS[email].include?(b[0]) }
         incptext = true
-        ptext += "= #{iss[1].length} bug(s) that should be fixed for the next Debian release:\n"
-        iss[1].each do |b|
+        ptext += "= #{bugs.length} bug(s) that should be fixed for the next Debian release:\n"
+        bugs.each do |b|
           ptext += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n"
           ptext += "  #{bugtitles[b[0]]}\n"
           if b[2] == "RC"
@@ -219,7 +257,7 @@
   end
   gtext += <<-EOF
 ------------ interesting stuff probably ends here ------------
-This is an automated mail. These mails are sent monthly.
+This is an automated mail. These mails are sent two times per month.
 For more information about these mails, refer to
 http://wiki.debian.org/qa.debian.org/DdpoByMail
 
@@ -230,6 +268,8 @@
 If you don't want to receive this type of mail any more, you can reply
 to this mail and use one of the following commands at the beginning of
 the mail:
+- only1permonth <email>
+You will receive this mail once per month, not twice.
 - unsubscribe <email>
 You will no longer receive any mail for any package
 - ignore <package> <email>

Modified: ddpo-by-mail/testingissues.rb
===================================================================
--- ddpo-by-mail/testingissues.rb	2008-06-05 08:55:46 UTC (rev 878)
+++ ddpo-by-mail/testingissues.rb	2008-06-05 12:25:28 UTC (rev 879)
@@ -10,10 +10,7 @@
   pts = PkgTestingStatus::read(File::new(file,'r')).reject { |k,v| v.inunstable != now }
   testingissues = {}
   pts.each_pair do |pkg, val|
-    if dipkgs.include?(pkg)
-      puts "Ignoring the testing status of #{pkg} (contains udebs)"
-      next
-    end
+    next if dipkgs.include?(pkg)
     ok, days = val.testing_ok?(AGE_IN_DEBIAN)
     if not ok
       testingissues[pkg] = [:not_testing, true, days ]

Modified: ddpo-by-mail/update-data.rb
===================================================================
--- ddpo-by-mail/update-data.rb	2008-06-05 08:55:46 UTC (rev 878)
+++ ddpo-by-mail/update-data.rb	2008-06-05 12:25:28 UTC (rev 879)
@@ -8,6 +8,7 @@
   system("wget -q -O testing-status.raw http://qa.debian.org/~lucas/testing-status.raw")
   system("wget -q -O dehs.txt http://dehs.alioth.debian.org/ddpomail.txt")
   system("wget -q -O ood_excuses.txt http://qa.debian.org/~lucas/ood_excuses.txt")
+  system("ssh master /org/packages.qa.debian.org/bin/get-summary-subscribers.pl > pts_subscriptions.txt")
 end
 
 if $0 == __FILE__




More information about the Collab-qa-commits mailing list