| 1 |
#!/usr/bin/ruby -w
|
| 2 |
require 'dbi'
|
| 3 |
|
| 4 |
puts "Content-type: text/html\n\n"
|
| 5 |
|
| 6 |
dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
|
| 7 |
|
| 8 |
puts "<html><body>"
|
| 9 |
|
| 10 |
sth = dbh.prepare("select sources.source, insts, date(op.orphaned_time), op.type, op.bug
|
| 11 |
from sources, popcon_src, orphaned_packages op, bugs b
|
| 12 |
where sources.source = popcon_src.source
|
| 13 |
and distribution = 'debian' and release = 'sid'
|
| 14 |
and sources.source = op.source
|
| 15 |
and b.id = op.bug
|
| 16 |
and op.type in ('O', 'ITA')
|
| 17 |
and insts < 500
|
| 18 |
and date(op.orphaned_time) < '2008-07-24'
|
| 19 |
and date(b.last_modified) < '2008-07-24'")
|
| 20 |
sth.execute
|
| 21 |
puts "<table>"
|
| 22 |
sth.fetch_all.each do |r|
|
| 23 |
puts "<tr><td><a href=\"http://packages.qa.debian.org/#{r[0]}\">#{r[0]}</a></td><td>#{r[1]}</td><td>#{r[2]}</td><td><a href=\"http://bugs.debian.org/#{r[4]}\">#{r[3]}</a></td></tr>"
|
| 24 |
end
|
| 25 |
puts "</table>"
|
| 26 |
sth.finish
|