#!/usr/bin/ruby -w require 'dbi' require 'pp' require 'uri' require 'net/http' require 'cgi' URELEASE='maverick' $cgi = CGI::new if $cgi.has_key?('csv') puts "Content-type: text/plain\n\n" else puts "Content-type: text/html\n\n" puts <<-EOF Ubuntu FTBFS

Ubuntu packages that FTBFS

Contact: Lucas Nussbaum
EOF end STDOUT.flush res32 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.maverick.32')).split(/\n/) res64 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.maverick.64')).split(/\n/) dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest') sth = dbh.prepare("select u.source, u.version, u.component, d.version as dversion, d.version > u.version as vercmp from ubuntu_sources u LEFT JOIN (SELECT source, version from sources_uniq where distribution='debian' and release='sid') d on (u.source = d.source) where u.distribution='ubuntu' and u.release='#{URELEASE}' order by u.component, u.source") sth.execute ; rows_u = sth.fetch_all sth.finish fails = {} res32.each do |l| pkg, v, res, reason = l.split(' ', 4) fails[pkg] = {} if fails[pkg].nil? fails[pkg]['32'] = [res, reason] fails[pkg]['version'] = v end res64.each do |l| pkg, v, res, reason = l.split(' ', 4) fails[pkg] = {} if fails[pkg].nil? fails[pkg]['64'] = [res, reason] fails[pkg]['version'] = v end fails.delete_if { |k, v| (v['32'].nil? or v['32'][0] == 'OK') and (v['64'].nil? or v['64'][0] == 'OK') } outdatedres = [] if not $cgi.has_key?('csv') puts "#{fails.length} packages failed to build.

" puts "" puts "" end def showrow(r, fa) if $cgi.has_key?('csv') print "#{r['source']},#{fa['version']},#{r['component']}," if r['dversion'].nil? print "Not in Debian" elsif r['vercmp'] print "Yes" else print "No" end ['32','64'].each do |a| if fa[a].nil? print ",N/A" else print ",http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_lmaverick#{a}.buildlog,#{fa[a][0]}" end end puts else puts "" if r['dversion'].nil? puts "" elsif r['vercmp'] puts "" else puts "" end ['32','64'].each do |a| if fa[a].nil? puts "" else puts "" end end if fa['32'].nil? or fa['32'][0] == 'OK' # only amd64 failed puts "" elsif fa['64'].nil? or fa['64'][0] == 'OK' # only i386 failed puts "" elsif fa['32'][1] == fa['64'][1] # both failed with the same message puts "" else puts "" end puts "" end end rows_u.each do |r| fa = fails[r['source']] next if fa == nil if r['version'] != fa['version'] outdatedres << r next end showrow(r, fa) end if not $cgi.has_key?('csv') puts "
PackageSectionNewer in Debiani386amd64Reason
#{r['source']} #{fa['version']} PTS BTS LP #{r['component']}Not in DebianYesNoN/A#{fa[a][0]}#{fa['64'][1]}#{fa['32'][1]}#{fa['64'][1]}i386: #{fa['32'][1]}
amd64: #{fa['64'][1]}
" puts "

Outdated results

" puts "Those test builds were done with a version of the package that was superseded by a newer version in maverick.

" puts "" puts "" end outdatedres.each do |r| fa = fails[r['source']] showrow(r, fa) end if not $cgi.has_key?('csv') puts "
PackageSectionNewer in Debiani386amd64Reason
" puts "" puts "" end