| 4 |
require 'pp' |
require 'pp' |
| 5 |
require 'uri' |
require 'uri' |
| 6 |
require 'net/http' |
require 'net/http' |
| 7 |
|
require 'cgi' |
| 8 |
|
|
| 9 |
URELEASE='lucid' |
URELEASE='lucid' |
| 10 |
|
|
| 11 |
|
$cgi = CGI::new |
| 12 |
|
|
| 13 |
|
if $cgi.has_key?('csv') |
| 14 |
|
puts "Content-type: text/plain\n\n" |
| 15 |
|
else |
| 16 |
puts "Content-type: text/html\n\n" |
puts "Content-type: text/html\n\n" |
| 17 |
|
|
| 18 |
puts <<-EOF |
puts <<-EOF |
| 38 |
|
|
| 39 |
Contact: <a href="mailto: lucas@ubuntu.com">Lucas Nussbaum</a><br> |
Contact: <a href="mailto: lucas@ubuntu.com">Lucas Nussbaum</a><br> |
| 40 |
EOF |
EOF |
| 41 |
|
end |
| 42 |
|
|
| 43 |
STDOUT.flush |
STDOUT.flush |
| 44 |
|
|
| 66 |
end |
end |
| 67 |
fails.delete_if { |k, v| (v['32'].nil? or v['32'][0] == 'OK') and (v['64'].nil? or v['64'][0] == 'OK') } |
fails.delete_if { |k, v| (v['32'].nil? or v['32'][0] == 'OK') and (v['64'].nil? or v['64'][0] == 'OK') } |
| 68 |
|
|
| 69 |
|
outdatedres = [] |
| 70 |
|
|
| 71 |
|
if not $cgi.has_key?('csv') |
| 72 |
|
|
| 73 |
puts "#{fails.length} packages failed to build.<br><br>" |
puts "#{fails.length} packages failed to build.<br><br>" |
| 74 |
|
|
|
outdatedres = [] |
|
| 75 |
puts "<table>" |
puts "<table>" |
| 76 |
puts "<tr><th>Package</th><th>Section</th><th>Newer in Debian</th><th>i386</th><th>amd64</th><th>Reason</th></tr>" |
puts "<tr><th>Package</th><th>Section</th><th>Newer in Debian</th><th>i386</th><th>amd64</th><th>Reason</th></tr>" |
| 77 |
|
end |
| 78 |
|
|
| 79 |
def showrow(r, fa) |
def showrow(r, fa) |
| 80 |
|
if $cgi.has_key?('csv') |
| 81 |
|
print "#{r['source']},#{fa['version']},#{r['component']}," |
| 82 |
|
if r['dversion'].nil? |
| 83 |
|
print "Not in Debian" |
| 84 |
|
elsif r['vercmp'] |
| 85 |
|
print "Yes" |
| 86 |
|
else |
| 87 |
|
print "No" |
| 88 |
|
end |
| 89 |
|
['32','64'].each do |a| |
| 90 |
|
if fa[a].nil? |
| 91 |
|
print ",N/A" |
| 92 |
|
else |
| 93 |
|
print ",http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_llucid#{a}.buildlog,#{fa[a][0]}" |
| 94 |
|
end |
| 95 |
|
end |
| 96 |
|
puts |
| 97 |
|
else |
| 98 |
puts "<tr><td>#{r['source']} #{fa['version']} |
puts "<tr><td>#{r['source']} #{fa['version']} |
| 99 |
<a href=\"http://packages.qa.debian.org/#{r['source']}\">PTS</a> |
<a href=\"http://packages.qa.debian.org/#{r['source']}\">PTS</a> |
| 100 |
<a href=\"http://bugs.debian.org/src:#{r['source']}\">BTS</a> |
<a href=\"http://bugs.debian.org/src:#{r['source']}\">BTS</a> |
| 124 |
puts "<td>i386: #{fa['32'][1]}<br>amd64: #{fa['64'][1]}</td>" |
puts "<td>i386: #{fa['32'][1]}<br>amd64: #{fa['64'][1]}</td>" |
| 125 |
end |
end |
| 126 |
puts "</tr>" |
puts "</tr>" |
| 127 |
|
end |
| 128 |
end |
end |
| 129 |
|
|
| 130 |
rows_u.each do |r| |
rows_u.each do |r| |
| 136 |
end |
end |
| 137 |
showrow(r, fa) |
showrow(r, fa) |
| 138 |
end |
end |
| 139 |
|
if not $cgi.has_key?('csv') |
| 140 |
puts "</table>" |
puts "</table>" |
|
# FIXME outdatedres |
|
| 141 |
|
|
| 142 |
puts "<h2>Outdated results</h2>" |
puts "<h2>Outdated results</h2>" |
| 143 |
puts "Those test builds were done with a version of the package that was superseded by a newer version in lucid.<br><br>" |
puts "Those test builds were done with a version of the package that was superseded by a newer version in lucid.<br><br>" |
| 144 |
puts "<table>" |
puts "<table>" |
| 145 |
puts "<tr><th>Package</th><th>Section</th><th>Newer in Debian</th><th>i386</th><th>amd64</th><th>Reason</th></tr>" |
puts "<tr><th>Package</th><th>Section</th><th>Newer in Debian</th><th>i386</th><th>amd64</th><th>Reason</th></tr>" |
| 146 |
|
end |
| 147 |
|
|
| 148 |
outdatedres.each do |r| |
outdatedres.each do |r| |
| 149 |
fa = fails[r['source']] |
fa = fails[r['source']] |
| 150 |
showrow(r, fa) |
showrow(r, fa) |
| 151 |
end |
end |
| 152 |
|
if not $cgi.has_key?('csv') |
| 153 |
puts "</table>" |
puts "</table>" |
| 154 |
puts "</body>" |
puts "</body>" |
| 155 |
puts "</html>" |
puts "</html>" |
| 156 |
|
end |