[Collab-qa-commits] r1742 - ddpo-by-mail
Lucas Nussbaum
lucas at alioth.debian.org
Mon May 17 14:05:32 UTC 2010
Author: lucas
Date: 2010-05-17 14:05:25 +0000 (Mon, 17 May 2010)
New Revision: 1742
Modified:
ddpo-by-mail/Makefile
ddpo-by-mail/ddpo-config.rb
ddpo-by-mail/reminder-mail.rb
ddpo-by-mail/udddata.rb
Log:
various improvements
Modified: ddpo-by-mail/Makefile
===================================================================
--- ddpo-by-mail/Makefile 2010-05-07 15:24:31 UTC (rev 1741)
+++ ddpo-by-mail/Makefile 2010-05-17 14:05:25 UTC (rev 1742)
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-UPDATE_TARGETS:=dehs.txt wnpp_rm bugs_stable.txt bugs_unstable.txt security-packages.txt
+UPDATE_TARGETS:=dehs.txt wnpp_rm security-packages.txt
ARCHITECTURES:=alpha,amd64,armel,hppa,hurd-i386,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,sparc
#ARCHITECTURES:=$(shell dpkg-architecture -L | tr "\n" ",")
LOCAL_MIRROR:=/org/ftp.debian.org/ftp
Modified: ddpo-by-mail/ddpo-config.rb
===================================================================
--- ddpo-by-mail/ddpo-config.rb 2010-05-07 15:24:31 UTC (rev 1741)
+++ ddpo-by-mail/ddpo-config.rb 2010-05-17 14:05:25 UTC (rev 1742)
@@ -2,16 +2,10 @@
if ENV['DEBFULLNAME']
OWNER = ENV['DEBFULLNAME']
else
- OWNER = `getent passwd $(id -un) | cut -d: -f5`
+ OWNER = 'Lucas Nussbaum'
end
-if ENV['DEBEMAIL']
- OWNER_EMAIL = ENV['DEBEMAIL']
-else
- require 'etc'
- require 'socket'
- OWNER_EMAIL = Etc.getlogin+'@'+Socket.gethostname
-end
+OWNER_EMAIL = 'ddpomail at qa.debian.org'
# Globally excluded packages
EXC_PKGS = [
@@ -60,6 +54,7 @@
'rmh at aybabtu.com',
'robert at leblancnet.us',
'salgado at async.com.br',
+ 'sd at sedf.de',
'severin at cip.physik.uni-freiburg.de',
'scott at ubuntu.com',
'snaky.by at gmail.com',
@@ -99,11 +94,12 @@
EXC_EMAILS_PKGS['pkern at debian.org'] = ['ekiga']
EXC_EMAILS_PKGS['ad_debian at joonet.de'] = ['kfreebsd-7', 'kfreebsd-8']
EXC_EMAILS_PKGS['mail.to.depa at gmail.com'] = ['icedove']
+EXC_EMAILS_PKGS['wolf at kondancemilch.de'] = ['apt-proxy']
-BUG_AGE = 2
+BUG_AGE = 1
AGE_IN_DEBIAN = 20
-LAST_IN_SYNC = 20
-LAST_IN_SYNC_SERIOUS = 30
+LAST_IN_SYNC = 14
+LAST_IN_SYNC_SERIOUS = 24
# etch released on 2007-04-08. So
# (Date::today - Date::parse('2007-04-08')).to_i
@@ -115,8 +111,16 @@
d = Date::today
MAIL_DIR = "archives/" + d.year.to_s + d.month.to_s + d.day.to_s
+RGEMAILS = [
+ 'debian-bsd at lists.debian.org',
+ 'debian-gcc at lists.debian.org',
+ 'debian-i18n at lists.debian.org',
+ 'debian-qa at lists.debian.org',
+ 'debian-release at lists.debian.org',
+ 'initscripts-ng-devel at lists.alioth.debian.org',
+]
+
# Release Goals
-# FIXME missing tags: goal-enriched-chroot
RGTAGS = {
'goal-dash' => 'switch /bin/sh to dash',
'qa-doublebuild' => 'double compilation support',
@@ -143,33 +147,3 @@
'ftbfs-gcc-4.4' => 'support gcc 4.4 as the default compiler',
'kfreebsd' => 'kfreebsd-* as release architectures'
}
-
-=begin
-RGTAGS = {
- 'goal-dash' => 'switch /bin/sh to dash',
- 'qa-doublebuild' => 'double compilation support',
- 'goal-recommends' => 'no unmet recommends',
- 'debmake' => 'drop debmake from Debian',
- 'utf8-control' => 'UTF-8 changelog and control',
- 'piuparts-stable-upgrade' => 'piuparts-clean archive',
- 'goal-python2.5' => 'python2.5 support',
- 'gfortran' => 'g77 -> gfortran transition',
- 'lfs' => 'Remove arbitrary file size limits',
- 'ipv6' => 'IPv6 support',
- 'nfs-v4' => 'Support version 4 of the NFS protocol',
- 'ddtp' => 'I18n support for package descriptions',
- 'not-using-po-debconf' => 'I18n support in all debconf-using packages',
- 'goal-ddtp' => 'I18n support for package descriptions',
- 'boot-dependencies' => 'dependency-based init system',
- 'missing-dependency' => 'dependency-based init system',
- 'obsolete-initscript' => 'dependency-based init system',
- 'runtime-problem' => 'dependency-based init system',
- 'incorrect-provides' => 'dependency-based init system',
- 'incorrect-dependency' => 'dependency-based init system',
- 'incorrect-boot-order' => 'dependency-based init system',
- 'incorrect-updatercd-order' => 'dependency-based init system',
- 'ftbfs-gcc-4.4' => 'support gcc 4.4 as the default compiler',
- 'ftbfs-gcc-4.5' => 'support gcc 4.5 as the default compiler',
- 'kfreebsd' => 'kfreebsd-* as release architectures'
-}
-=end
Modified: ddpo-by-mail/reminder-mail.rb
===================================================================
--- ddpo-by-mail/reminder-mail.rb 2010-05-07 15:24:31 UTC (rev 1741)
+++ ddpo-by-mail/reminder-mail.rb 2010-05-17 14:05:25 UTC (rev 1742)
@@ -3,7 +3,6 @@
puts "#{Time::now} Starting and reading the data we need"
require 'ddpo-config'
-require 'bugs'
require 'udddata'
udd = UDDData::new
@@ -47,6 +46,8 @@
builds = udd.missing_builds
lintian = udd.lintian
dehs = udd.dehs
+rcbugs = udd.rcbugs
+rgbugs = udd.rgbugs
# get removals
rms = []
@@ -67,8 +68,6 @@
end
=end
-bugs = parse_bugs
-
# compute testing issues
testingissues = {}
udd.testing_status.each_pair do |pkg, v|
@@ -95,7 +94,7 @@
serious = {}
issues = {}
-(bugs.keys + testingissues.keys + dehs.keys + security.keys).sort.uniq.each do |pkg|
+(rcbugs.keys + rgbugs.keys + testingissues.keys + dehs.keys + security.keys).sort.uniq.each do |pkg|
next if $pkg_maintainer[pkg].nil? # means the package wasn't in unstable Sources!
if EXC_PKGS.include?(pkg)
@@ -108,10 +107,14 @@
end
pissues = []
pserious = false
- if bugs[pkg] != nil
- pissues << [ :bugs, bugs[pkg] ]
- pserious = bugs[pkg].inject(pserious) { |a, b| a or b[1] } # update pserious
+ if rcbugs[pkg] != []
+ pissues << [ :rcbugs, rcbugs[pkg] ]
+ pserious = true
end
+ if rgbugs[pkg] != []
+ pissues << [ :rgbugs, rgbugs[pkg] ]
+ pserious = true
+ end
if builds[pkg]
pissues << [ :builds, builds[pkg] ]
pserious = true
@@ -143,7 +146,8 @@
# prevent typos by using constants, so that it breaks :)
T_INCLUDE = "include"
T_HEADER = "header"
-T_BUGS = "bugs"
+T_RCBUGS = "rcbugs"
+T_RGBUGS = "rgbugs"
T_BUILDS = "builds"
T_TESTING = "testing"
T_LINTIAN = "lintian"
@@ -209,6 +213,7 @@
text = {}
text[T_DEHS] = ""
+ text[T_LINTIAN] = ""
# iterate on all packages
(maintained.keys + mpkgs.keys).sort.uniq.each do |pkg|
@@ -231,25 +236,25 @@
text[pkg][T_HEADER] = "=== #{pkg}:#{comaint}\n"
text[pkg][T_INCLUDE] = false
issues[pkg].each do |iss|
- if iss[0] == :bugs
+ if iss[0] == :rcbugs
bugs = iss[1].reject { |b| EXC_EMAILS_BUGS[email].include?(b[0]) }
next if bugs.length == 0
text[pkg][T_INCLUDE] = true
- text[pkg][T_BUGS] = "= #{bugs.length} Release Critical or Release Goal bug(s):\n"
+ text[pkg][T_RCBUGS] = "= #{bugs.length} Release Critical bug(s):\n"
bugs.each do |b|
- text[pkg][T_BUGS] += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n"
- text[pkg][T_BUGS] += " #{b[3]}\n"
- if b[2] == "RC"
- if b[4]
- text[pkg][T_BUGS] += " Appears to affect stable, you should fix it for the next point release\n"
- end
- # add nothing
- elsif b[2] == "PROP"
- # add nothing
- else
- text[pkg][T_BUGS] += " Part of release goal: #{b[2]}\n"
- end
+ text[pkg][T_RCBUGS] += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n"
+ text[pkg][T_RCBUGS] += " #{b[1]}\n"
end
+ elsif iss[0] == :rgbugs
+ bugs = iss[1].reject { |b| EXC_EMAILS_BUGS[email].include?(b[0]) }
+ next if bugs.length == 0
+ text[pkg][T_INCLUDE] = true
+ text[pkg][T_RGBUGS] = "= #{bugs.length} Release Goals bug(s):\n"
+ bugs.each do |b|
+ text[pkg][T_RGBUGS] += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n"
+ text[pkg][T_RGBUGS] += " #{b[1]}\n"
+ text[pkg][T_RGBUGS] += " Part of release goal: #{RGTAGS[b[2]]}\n"
+ end
elsif iss[0] == :builds
text[pkg][T_INCLUDE] = true
text[pkg][T_BUILDS] = "= Missing build(s) on #{iss[1].join(' ')}\n"
@@ -276,22 +281,15 @@
end
text[T_DEHS] += " #{pkg} #{iss[2]} (Debian: #{iss[1]})\n"
elsif iss[0] == :lintian
- next if iss[1] < 1
+ if text[T_LINTIAN] == ''
+ text[T_LINTIAN] = "=== Packages with lintian errors and warnings:\n"
+ end
if $pkg_maintainer[pkg].nil?
puts "Ugh, pkg vs maintainer relationship missing for #{pkg}!"
exit
end
- text[pkg][T_INCLUDE] = true if iss[1] > 0
- text[pkg][T_LINTIAN] = "= Lintian:"
- if iss[1] > 0
- text[pkg][T_LINTIAN] += " #{iss[1]} error(s)"
- end
- if iss[2] and iss[2].to_i > 0
- text[pkg][T_LINTIAN] += " and" if iss[1] > 0
- text[pkg][T_LINTIAN] += " #{iss[2]} warning(s)"
- end
- text[pkg][T_LINTIAN] += "\n"
- text[pkg][T_LINTIAN] += " See http://lintian.debian.org/maintainer/#{$pkg_maintainer[pkg]}.html##{pkg}\n"
+ text[T_LINTIAN] += "- #{pkg} (#{iss[1]} errors, #{iss[2]} warnings)\n"
+ text[T_LINTIAN] += " <http://lintian.debian.org/maintainer/#{$pkg_maintainer[pkg]}.html##{pkg}>\n"
elsif iss[0] == :security
text[pkg][T_INCLUDE] = true
text[pkg][T_SECURITY] = "= There "
@@ -312,10 +310,10 @@
if text[pkg][T_INCLUDE]
gtext += text[pkg][T_HEADER]
gtext += text[pkg][T_SECURITY] if text[pkg][T_SECURITY]
- gtext += text[pkg][T_BUGS] if text[pkg][T_BUGS]
+ gtext += text[pkg][T_RCBUGS] if text[pkg][T_RCBUGS]
+ gtext += text[pkg][T_RGBUGS] if text[pkg][T_RGBUGS]
gtext += text[pkg][T_BUILDS] if text[pkg][T_BUILDS]
gtext += text[pkg][T_TESTING] if text[pkg][T_TESTING]
- gtext += text[pkg][T_LINTIAN] if text[pkg][T_LINTIAN]
gtext += "\n"
end
end
@@ -328,9 +326,8 @@
next
end
# add dehs text
- if text[T_DEHS] != ''
- gtext += text[T_DEHS] + "\n"
- end
+ gtext += text[T_DEHS] + "\n" if text[T_DEHS] != ''
+ gtext += text[T_LINTIAN] + "\n" if text[T_LINTIAN] != ''
gtext += <<-EOF
------------ interesting stuff probably ends here ------------
We are sorry if this mail was useless for you. If you think it was
Modified: ddpo-by-mail/udddata.rb
===================================================================
--- ddpo-by-mail/udddata.rb 2010-05-07 15:24:31 UTC (rev 1741)
+++ ddpo-by-mail/udddata.rb 2010-05-17 14:05:25 UTC (rev 1742)
@@ -1,9 +1,10 @@
#!/usr/bin/ruby
require 'dbi'
+require 'ddpo-config'
require 'pp'
class UDDData
- attr_reader :maintainers, :uploaders, :names, :testing_status, :missing_builds, :lintian, :debian_installer_sources, :pts, :dehs
+ attr_reader :maintainers, :uploaders, :names, :testing_status, :missing_builds, :lintian, :debian_installer_sources, :pts, :dehs, :rcbugs, :rgbugs
def initialize
@dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guestdd', ENV['dbpw'])
@@ -16,6 +17,8 @@
@debian_installer_sources = []
@pts = Hash::new { [] }
@dehs = {}
+ @rcbugs = Hash::new { [] }
+ @rgbugs = Hash::new { [] }
end
def fetch
@@ -67,6 +70,17 @@
@dbh.select_all("select source, unstable_version, unstable_upstream from dehs where unstable_status = 'outdated'") do |r|
@dehs[r['source']] = [ r['unstable_version'], r['unstable_upstream']]
end
+ # bugs
+ @dbh.select_all("select bugs.id, bugs_packages.source, bugs.title from bugs, bugs_packages where bugs.id = bugs_packages.id and severity >= 'serious' and bugs.id in (select id from bugs_rt_affects_unstable)") do |r|
+ @rcbugs[r['source']] = [] if @rcbugs[r['source']].empty?
+ @rcbugs[r['source']] << [r['id'], r['title']]
+ end
+ emails = RGEMAILS.join("','")
+ tags = RGTAGS.keys.join("','")
+ @dbh.select_all("select bugs.id, bugs_packages.source, bugs.title, bugs_usertags.tag from bugs, bugs_packages, bugs_usertags where bugs.id = bugs_packages.id and bugs.id = bugs_usertags.id and bugs.id in (select id from bugs_rt_affects_unstable) and tag in ('#{tags}') and email in ('#{emails}')") do |r|
+ @rgbugs[r['source']] = [] if @rgbugs[r['source']].empty?
+ @rgbugs[r['source']] << [r['id'], r['title'], r['tag']]
+ end
end
end
@@ -75,6 +89,7 @@
t = Time::now
udd.fetch
te = Time::now
- pp udd.dehs
+ pp udd.rcbugs
+ pp udd.rgbugs
puts te - t
end
More information about the Collab-qa-commits
mailing list