#!/usr/bin/ruby -w require 'dbi' require 'pp' require 'uri' require 'net/http' puts "Content-type: text/html\n\n" puts <<-EOF Ubuntu FTBFS

Ubuntu packages that FTBFS

Contact: Lucas Nussbaum
EOF STDOUT.flush res32 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.lucid.32')).split(/\n/) res64 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.lucid.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='lucid' 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') } puts "#{fails.length} packages failed to build.

" outdatedres = [] puts "" puts "" def showrow(r, fa) 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 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 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]}
" # FIXME outdatedres puts "

Outdated results

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

" puts "" puts "" outdatedres.each do |r| fa = fails[r['source']] showrow(r, fa) end puts "
PackageSectionNewer in Debiani386amd64Reason
" puts "" puts ""