[Collab-qa-commits] r1576 - udd/web/cgi-bin

Lucas Nussbaum lucas at alioth.debian.org
Sun Sep 6 18:14:19 UTC 2009


Author: lucas
Date: 2009-09-06 18:14:18 +0000 (Sun, 06 Sep 2009)
New Revision: 1576

Added:
   udd/web/cgi-bin/bugs-removed-packages.cgi
Log:
script that lists open bugs affecting removed packages

Added: udd/web/cgi-bin/bugs-removed-packages.cgi
===================================================================
--- udd/web/cgi-bin/bugs-removed-packages.cgi	                        (rev 0)
+++ udd/web/cgi-bin/bugs-removed-packages.cgi	2009-09-06 18:14:18 UTC (rev 1576)
@@ -0,0 +1,43 @@
+#!/usr/bin/ruby -w
+require 'dbi'
+
+# see merkel:/org/bugs.debian.org/etc/pseudo-packages.description
+PSEUDO_PKGS = ['base', 'cdrom', 'spam', 'press', 'kernel', 'project',
+'general', 'listarchives', 'nm.debian.org', 'qa.debian.org',
+'ftp.debian.org', 'www.debian.org', 'bugs.debian.org', 'lists.debian.org',
+'wnpp', 'cdimage.debian.org', 'tech-ctte', 'mirrors', 'security.debian.org',
+'installation-reports', 'upgrade-reports', 'release-notes', 'wiki.debian.org',
+'security-tracker', 'release.debian.org', 'debian-policy', 'debian-i18n',
+'buildd.emdebian.org', 'buildd.debian.org' ]
+
+EXCLUDED = [
+  /^(linux|kernel)-(image|source)-/, # we don't care about those bugs for now
+]
+
+puts "Content-type: text/html\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+
+puts "<html><body>"
+
+sth = dbh.prepare <<-EOF
+SELECT source, package, id from bugs
+where not affects_unstable and not affects_testing and not affects_stable
+and source not in (select source from sources where distribution='debian' and release in ('squeeze', 'sid', 'experimental'))
+and source not in (#{PSEUDO_PKGS.map { |p| "'#{p}'"}.join(",")})
+and not package ~ '^(linux|kernel)-(image|source)-'
+and status != 'done'
+order by source, id
+EOF
+sth.execute
+puts "<table border=\"1\">"
+n = 0
+sth.fetch_all.each do |r|
+  puts "<tr><td><a href=\"http://packages.qa.debian.org/#{r[0]}\">#{r[0]}</a></td>"
+  puts "<td><a href=\"http://packages.debian.org/#{r[1]}\">#{r[1]}</a></td>"
+  puts "<td><a href=\"http://bugs.debian.org/#{r[2]}\">#{r[2]}</a></td></tr>"
+  n += 1
+end
+puts "</table>"
+puts "#{n} bugs found."
+sth.finish


Property changes on: udd/web/cgi-bin/bugs-removed-packages.cgi
___________________________________________________________________
Added: svn:executable
   + *




More information about the Collab-qa-commits mailing list