[Collab-qa-commits] r690 - ddpo-by-mail
lucas at alioth.debian.org
lucas at alioth.debian.org
Fri Feb 1 23:40:42 UTC 2008
Author: lucas
Date: 2008-02-01 23:40:42 +0000 (Fri, 01 Feb 2008)
New Revision: 690
Added:
ddpo-by-mail/dehs.rb
Modified:
ddpo-by-mail/reminder-mail.rb
Log:
DEHS integration
Added: ddpo-by-mail/dehs.rb
===================================================================
--- ddpo-by-mail/dehs.rb (rev 0)
+++ ddpo-by-mail/dehs.rb 2008-02-01 23:40:42 UTC (rev 690)
@@ -0,0 +1,24 @@
+# parse testing status
+require 'ddpo-config'
+require 'date'
+require 'pp'
+
+def get_dehs
+ dehs = {}
+ IO::read('dehs.txt').each_line do |l|
+ pkg, unstable, upstream, date = l.chomp.split('|')
+ serious = false
+ if date != "1970-01-01 00:00:00"
+ d = Date::parse(date)
+ # FIXME add test if Date::today - d > DIFF, then serious = true
+ end
+ dehs[pkg] = [ unstable, upstream, serious ]
+ end
+ return dehs
+end
+
+if $0 == __FILE__
+ dehs = get_dehs
+ pp dehs
+end
+
Modified: ddpo-by-mail/reminder-mail.rb
===================================================================
--- ddpo-by-mail/reminder-mail.rb 2008-02-01 07:43:10 UTC (rev 689)
+++ ddpo-by-mail/reminder-mail.rb 2008-02-01 23:40:42 UTC (rev 690)
@@ -4,6 +4,7 @@
require 'bugs'
require 'testingissues'
require 'update-data'
+require 'dehs'
# fetch updated files from www
update_data
@@ -58,12 +59,13 @@
bugs, bugtitles = parse_bugs
testingissues = testing_issues(dipkgs)
+dehs = get_dehs
puts "Computing issues for each package ..."
# compute issues for each package
serious = {}
issues = {}
-(bugs.keys + testingissues.keys).sort.uniq.each do |pkg|
+(bugs.keys + testingissues.keys + dehs.keys).sort.uniq.each do |pkg|
if EXC_PKGS.include?(pkg)
puts "Skipping #{pkg}, it is excluded."
next
@@ -82,6 +84,10 @@
pissues << testingissues[pkg]
pserious ||= testingissues[pkg][1]
end
+ if dehs[pkg]
+ pissues << [ :dehs, dehs[pkg][0], dehs[pkg][1] ]
+ serious[pkg] ||= dehs[pkg][2]
+ end
unless pissues.empty?
issues[pkg] = pissues
serious[pkg] = pserious
@@ -115,6 +121,13 @@
mpkgs[pkg] = true
end
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
mpkgs.keys.sort.each do |pkg|
next if issues[pkg].nil?
# skip if excluded
@@ -131,12 +144,12 @@
testingpl = false
issues[pkg].each do |iss|
if iss[0] == :bugs
- ptext += "= This package has #{iss[1].length} bug(s) that shoud really be fixed for the next release:\n"
+ ptext += "= This package has #{iss[1].length} bug(s) that shoud really be fixed for the next Debian release:\n"
iss[1].each do |b|
ptext += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n"
ptext += " #{bugtitles[b[0]]}\n"
if b[2] == "RC"
- ptext += " RELEASE-CRITICAL BUG!\n"
+ ptext += " This is a Release-Critical bug!\n"
else
ptext += " Bug part of a release goal: #{b[2]}\n"
end
@@ -149,6 +162,9 @@
ptext += "= This package has not been able to migrate from unstable\n"
ptext += " to testing for #{iss[2]} days.\n"
testingpl = true
+ elsif iss[0] == :dehs
+ ptext += "= A newer upstream version exists for this package (or your watch file is broken):\n"
+ ptext += " upstream: #{iss[2]} Debian: #{iss[1]}\n"
else
raise "Unknown issue #{iss[0]}!"
end
More information about the Collab-qa-commits
mailing list