| 1 |
#!/usr/bin/ruby -w
|
| 2 |
# Used by DDPO
|
| 3 |
|
| 4 |
require 'dbi'
|
| 5 |
|
| 6 |
RELEASE='oneiric'
|
| 7 |
|
| 8 |
puts "Content-type: text/html\n\n"
|
| 9 |
|
| 10 |
dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
|
| 11 |
sth = dbh.prepare("select insts from ubuntu_popcon_src where source='coreutils'")
|
| 12 |
sth.execute
|
| 13 |
popcon = sth.fetch_all[0][0]
|
| 14 |
sth.finish
|
| 15 |
puts "Popcon for coreutils: #{popcon}<br>"
|
| 16 |
mpc = popcon/1000*100
|
| 17 |
puts "0.2% of coreutils popcon: #{mpc}<br>"
|
| 18 |
|
| 19 |
puts "### was in etch | lenny<br>"
|
| 20 |
sth = dbh.prepare("select src1.source, src1.version, coalesce(insts, 0) insts
|
| 21 |
from ubuntu_sources src1
|
| 22 |
join ubuntu_sources src2 using (source, version)
|
| 23 |
left join ubuntu_popcon_src popcon using (source)
|
| 24 |
where src1.component in ('universe', 'multiverse')
|
| 25 |
and src1.release='#{RELEASE}' and src2.release='hardy'
|
| 26 |
and src1.source not in
|
| 27 |
(select source from sources where release = 'sid')
|
| 28 |
and src1.source in
|
| 29 |
(select source from sources where release in ('etch','lenny'))
|
| 30 |
and insts < #{mpc}
|
| 31 |
order by insts asc")
|
| 32 |
sth.execute
|
| 33 |
sth.fetch_all.each do |r|
|
| 34 |
puts "<a href=\"http://packages.ubuntu.com/search?searchon=sourcenames&keywords=#{r['source']}\">#{r['source']}</a> #{r['version']} #{r['insts']} <a href=\"http://packages.qa.debian.org/#{r['source']}\">PTS</a><br>"
|
| 35 |
end
|
| 36 |
|
| 37 |
puts "### was NOT in etch | lenny<br>"
|
| 38 |
sth = dbh.prepare("select src1.source, src1.version, coalesce(insts, 0) insts
|
| 39 |
from ubuntu_sources src1
|
| 40 |
join ubuntu_sources src2 using (source, version)
|
| 41 |
left join ubuntu_popcon_src popcon using (source)
|
| 42 |
where src1.component in ('universe', 'multiverse')
|
| 43 |
and src1.release='#{RELEASE}' and src2.release='hardy'
|
| 44 |
and src1.source not in
|
| 45 |
(select source from sources where release = 'sid')
|
| 46 |
and src1.source not in
|
| 47 |
(select source from sources where release in ('etch','lenny'))
|
| 48 |
and insts < #{mpc}
|
| 49 |
order by insts asc")
|
| 50 |
sth.execute
|
| 51 |
sth.fetch_all.each do |r|
|
| 52 |
puts "<a href=\"http://packages.ubuntu.com/search?searchon=sourcenames&keywords=#{r['source']}\">#{r['source']}</a> #{r['version']} #{r['insts']} <a href=\"http://packages.qa.debian.org/#{r['source']}\">PTS</a><br>"
|
| 53 |
end
|