[Collab-qa-commits] r1693 - in udd/web: . cgi-bin cgi-bin/attic

Lucas Nussbaum lucas at alioth.debian.org
Sun Feb 21 10:28:53 UTC 2010


Author: lucas
Date: 2010-02-21 10:28:52 +0000 (Sun, 21 Feb 2010)
New Revision: 1693

Added:
   udd/web/cgi-bin/rcbugsl.cgi
   udd/web/cgi-bin/ruby1.9.0.cgi
   udd/web/cgi-bin/sources_rebuild.cgi
Modified:
   udd/web/
   udd/web/cgi-bin/attic/ubuntu_stats.cgi
   udd/web/cgi-bin/bapase.cgi
   udd/web/cgi-bin/ddpo-bugs-zeroes.cgi
   udd/web/cgi-bin/dpkgformat.cgi
   udd/web/cgi-bin/merges.cgi
   udd/web/cgi-bin/rcbugs.cgi
   udd/web/cgi-bin/ubuntu_ftbfs.cgi
   udd/web/cgi-bin/ubuntu_old_packages.cgi
Log:
various cgi updates


Property changes on: udd/web
___________________________________________________________________
Modified: svn:ignore
   - timestamps.txt
timing.txt
udd.sql.gz
crontabs.txt

   + udd-history.sql.gz
udd.sql.gz
crontabs.txt
timestamps.txt
timing.txt


Modified: udd/web/cgi-bin/attic/ubuntu_stats.cgi
===================================================================
--- udd/web/cgi-bin/attic/ubuntu_stats.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/attic/ubuntu_stats.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -2,95 +2,88 @@
 
 require 'dbi'
 require 'pp'
-RELEASE='jaunty'
+RELEASE='karmic'
 
 puts "Content-type: text/plain\n\n"
 
+def gcomp(rows, comp)
+  t = rows.select { |r| r[0] == comp }
+  if t == []
+    return 0
+  else
+    return t[0][1]
+  end
+end 
+def getnums(rows)
+  m = gcomp(rows, 'main') + gcomp(rows, 'restricted')
+  u = gcomp(rows, 'universe') + gcomp(rows, 'multiverse')
+  return [ m, u, m + u ]
+end
+
 dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
 sth = dbh.prepare("select count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'")
 sth.execute ; rows = sth.fetch_all
 allpkgs = rows[0][0]
-puts "Source packages in Ubuntu: #{allpkgs}"
 
-sth = dbh.prepare("select count(*) from sources where distribution = 'debian' and release = 'sid'")
+puts "Source packages in Ubuntu: #{allpkgs}"
+puts "Source packages per component:"
+sth = dbh.prepare("select component,count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' group by component")
 sth.execute ; rows = sth.fetch_all
-allpkgs = rows[0][0]
-puts "Source packages in Debian: #{allpkgs}"
+pp getnums(rows)
 
-sth = dbh.prepare("select count(*) from sources where distribution = 'debian' and release = 'lenny'")
-sth.execute ; rows = sth.fetch_all
-allpkgs = rows[0][0]
-puts "Source packages in Debian lenny: #{allpkgs}"
-sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
- group by component")
-sth.execute ; rows = sth.fetch_all
-pp rows
-
 puts "Not Ubuntu specific:"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
-AND source !~ '^language-(support|pack)-.*'
-AND source !~ '^kde-l10n-.*'
-AND source !~ 'ubuntu'
-AND source !~ 'launchpad'
- group by component")
+AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*'
+AND source !~ 'ubuntu' AND source !~ 'launchpad'
+group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-puts "Not Ubuntu specific, not in debian:"
+puts "Not Ubuntu specific, not in debian (not in lenny or sid):"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
-AND source !~ '^language-(support|pack)-.*'
-AND source !~ '^kde-l10n-.*'
-AND source !~ 'ubuntu'
-AND source !~ 'launchpad'
+AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*'
+AND source !~ 'ubuntu' AND source !~ 'launchpad'
 AND source not in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
  group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-puts "Not Ubuntu specific, not in debian, version !~ /ubuntu/ (FAIL!):"
+puts "Also in debian, version ~ /ubuntu/:"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
 AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*' AND source !~ 'ubuntu' AND source !~ 'launchpad'
-AND source not in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
-AND version !~ 'ubuntu'
+AND source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
+AND version ~ 'ubuntu'
  group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-puts "Also in Debian:"
+puts "Also in Debian, diverged + new upstream (version ~ /-0ubuntu/):"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
 AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*' AND source !~ 'ubuntu' AND source !~ 'launchpad'
 AND source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
+AND version ~ '-0ubuntu'
  group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-puts "Also in Debian, not diverged (version !~ /ubuntu/):"
+puts "Also in Debian, (version !~ /ubuntu/):"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
 AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*' AND source !~ 'ubuntu' AND source !~ 'launchpad'
 AND source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
 AND version !~ 'ubuntu'
  group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-
-puts "Also in Debian, diverged (version ~ /ubuntu/):"
+puts "Also in Debian, (version !~ /ubuntu/):"
 sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
 AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*' AND source !~ 'ubuntu' AND source !~ 'launchpad'
 AND source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
-AND version ~ 'ubuntu'
+AND version !~ 'ubuntu'
  group by component")
 sth.execute ; rows = sth.fetch_all
-pp rows
+pp getnums(rows)
 
-puts "Also in Debian, diverged + new upstream (version ~ /-0ubuntu/):"
-sth = dbh.prepare("select component, count(*) from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}'
-AND source !~ '^language-(support|pack)-.*' AND source !~ '^kde-l10n-.*' AND source !~ 'ubuntu' AND source !~ 'launchpad'
-AND source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
-AND version ~ '-0ubuntu'
- group by component")
-sth.execute ; rows = sth.fetch_all
-pp rows
 
 puts "diverged+new upstream (main):"
 sth = dbh.prepare("select source from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' and component = 'main'
@@ -149,7 +142,4 @@
 puts
 puts
 
-
-
-
 sth.finish

Modified: udd/web/cgi-bin/bapase.cgi
===================================================================
--- udd/web/cgi-bin/bapase.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/bapase.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -2,6 +2,8 @@
 require 'dbi'
 require 'cgi'
 
+tstart = Time::now
+
 class Actions
   attr_reader :actions, :act_todo, :act_status, :act_comment
   def initialize
@@ -160,6 +162,7 @@
 elsif type == 'nodd'
   orphaned = true
   query = <<EOF
+WITH active_emails AS (SELECT email FROM carnivore_emails, active_dds WHERE active_dds.id = carnivore_emails.id)
 select * from bapase where source in (
 SELECT source
 FROM sources
@@ -169,8 +172,8 @@
 FROM sources
 LEFT OUTER JOIN uploaders ON (sources.source = uploaders.source AND sources.version = uploaders.version AND sources.distribution = uploaders.distribution AND sources.release = uploaders.release AND sources.component = uploaders.component)
 WHERE sources.distribution = 'debian' AND sources.release = 'sid'
-AND (maintainer_email in (SELECT email FROM carnivore_emails, active_dds WHERE active_dds.id = carnivore_emails.id)
-OR email in (SELECT email FROM carnivore_emails, active_dds WHERE active_dds.id = carnivore_emails.id)
+AND (maintainer_email in (select email from active_emails)
+OR email in (SELECT email FROM active_emails)
 OR maintainer_email ~ '.*@lists.(alioth.)?debian.org'
 OR email ~ '.*@lists.(alioth.)?debian.org'))
 ) order by upload_age desc
@@ -296,8 +299,10 @@
 <th>Comments</th>
 </tr>
 EOF
+tqs = Time::now
 sth = dbh.prepare(query)
 sth.execute
+tqe = Time::now
 res = sth.fetch_all
 n = 0
 res.each do |r|
@@ -350,7 +355,8 @@
 end
 puts "</table>"
 
-puts " -- #{res.length} packages listed."
+tstop = Time::now
+puts " -- #{res.length} packages listed. Page generated in #{tstop - tstart} seconds. Query took #{tqe - tqs} seconds."
 puts "</body></html>"
 
 

Modified: udd/web/cgi-bin/ddpo-bugs-zeroes.cgi
===================================================================
--- udd/web/cgi-bin/ddpo-bugs-zeroes.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/ddpo-bugs-zeroes.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -79,9 +79,9 @@
   puts "#{patch[pkg]}(#{patch_m[pkg]})"
 end
 
-sth = dbh.prepare("select source from sources where distribution='debian'")
+sth = dbh.prepare("select distinct source from sources where distribution='debian'")
 sth.execute
 sth.fetch_all.each do |r|
   next if srcs[r[0]]
-  puts "#{r[0]} 0 0 0 0 0"
+  puts "#{r[0]}:0(0) 0(0) 0(0) 0(0) 0(0)"
 end

Modified: udd/web/cgi-bin/dpkgformat.cgi
===================================================================
--- udd/web/cgi-bin/dpkgformat.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/dpkgformat.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -7,7 +7,7 @@
 
 dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
 sth = dbh.prepare("select format, count(*) as cnt
-from sources
+from sources_uniq
 where distribution='debian' and release='sid'
 group by format order by format asc")
 sth.execute

Modified: udd/web/cgi-bin/merges.cgi
===================================================================
--- udd/web/cgi-bin/merges.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/merges.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -35,7 +35,8 @@
 UREL='lucid'
 puts "Debian release: #{DREL}<br>"
 puts "Ubuntu release: #{UREL}<br>"
-puts "Bugs data refreshed once a day. Packages data refreshed twice a day.<br>
+puts "Bugs data refreshed once a day. Packages data refreshed twice a day.<br>"
+puts "<a href=\"http://svn.debian.org/wsvn/collab-qa/udd/web/cgi-bin/merges.cgi\">Source code</a>"
 
 dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
 

Modified: udd/web/cgi-bin/rcbugs.cgi
===================================================================
--- udd/web/cgi-bin/rcbugs.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/rcbugs.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -3,6 +3,8 @@
 require 'dbi'
 require 'pp'
 
+URELEASE='lucid'
+
 puts "Content-type: text/html\n\n"
 
 puts <<-EOF
@@ -49,13 +51,13 @@
 puts "<table>"
 puts "<tr><th>bug</th><th>package</th><th>source</th><th>versions (D/U)</th><th>popcon</th><th>title</th></tr>"
 
-sth = dbh.prepare("WITH ubudeb AS (select distinct on (d.source, u.source) d.source as dsource, u.source as usource, d.version as dversion, u.version as uversion from sources_uniq d, ubuntu_sources u where d.release = 'sid' and d.distribution = 'debian' and u.release = 'lucid' and u.distribution = 'ubuntu' and u.source = d.source and u.version > d.version order by d.source asc, u.source asc, d.version desc)
+sth = dbh.prepare("WITH ubudeb AS (select distinct on (d.source, u.source) d.source as dsource, u.source as usource, d.version as dversion, u.version as uversion from sources_uniq d, ubuntu_sources u where d.release = 'sid' and d.distribution = 'debian' and u.release = '#{URELEASE}' and u.distribution = 'ubuntu' and u.source = d.source and u.version > d.version order by d.source asc, u.source asc, d.version desc)
 select id, bugs.package, bugs.source, title, dversion, uversion, insts from bugs, ubudeb, popcon_src where popcon_src.source = bugs.source and id in (select id from bugs_rt_affects_testing_and_unstable) and id not in (select id from bugs_tags where tag='patch') and id not in (select id from bugs_tags where tag='pending') and severity >= 'serious' and ubudeb.dsource = bugs.source order by id")
 sth.execute ; rows = sth.fetch_all
 rows.each do |r|
    puts "<tr><td><a href=\"http://bugs.debian.org/#{r['id']}\">#{r['id']}</a></td>"
    puts "<td>#{r['package']}</td>"
-   puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a> <a href=\"https://launchpad.net/ubuntu/lucid/+source/#{r['source']}/+changelog\">UbCh</a></td>"
+   puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a> <a href=\"https://launchpad.net/ubuntu/#{URELEASE}/+source/#{r['source']}/+changelog\">UbCh</a></td>"
    puts "<td>#{r['dversion']} / #{r['uversion']}</td>"
    puts "<td>#{r['insts']}</td>"
    puts "<td>#{r['title']}</td>"

Added: udd/web/cgi-bin/rcbugsl.cgi
===================================================================
--- udd/web/cgi-bin/rcbugsl.cgi	                        (rev 0)
+++ udd/web/cgi-bin/rcbugsl.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -0,0 +1,94 @@
+#!/usr/bin/ruby -w
+
+require 'dbi'
+require 'pp'
+require 'net/http'
+
+puts "Content-type: text/html\n\n"
+
+puts <<-EOF
+<html>
+<head>
+<style type="text/css">
+  td, th {
+    border: 1px solid gray;
+    padding-left: 3px;
+    padding-right: 3px;
+  }
+  tr:hover  {
+    background-color: #ccc;
+  }
+  table {
+    border-collapse: collapse;
+  }
+</style>
+<title>Possibly easy targets for RC bug squashing</title>
+</head>
+<body>
+<h1>Possibly easy targets for RC bug squashing</h1>
+EOF
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+
+pkgs = Net::HTTP.get(URI::parse('http://blop.info/pub/pkgs')).split(/\n/)
+pkgss= pkgs.join("','")
+sth = dbh.prepare("select source from packages where package in ('#{pkgss}')")
+sth.execute ; rows = sth.fetch_all
+spkgs = []
+rows.each do |r|
+  spkgs << r['source']
+end
+spkgss = spkgs.uniq.join("','")
+
+# all RC
+
+sth = dbh.prepare("select id, bugs.package, bugs.source, insts, title from bugs, popcon_src where bugs.source = popcon_src.source and id in (select id from bugs_rt_affects_testing_and_unstable) and severity >= 'serious' and bugs.source in ('#{spkgss}') order by id")
+sth.execute ; rows = sth.fetch_all
+
+puts "<h2>All RC bugs</h2>"
+puts "<table>"
+puts "<tr><th>bug</th><th>package</th><th>source</th><th>popcon</th><th>title</th></tr>"
+rows.each do |r|
+   puts "<tr><td><a href=\"http://bugs.debian.org/#{r['id']}\">#{r['id']}</a></td>"
+   puts "<td>#{r['package']}</td>"
+   puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a></td>"
+   puts "<td>#{r['insts']}</td>"
+   puts "<td>#{r['title']}</td>"
+end
+puts "</table>"
+sth.finish
+
+
+sth = dbh.prepare("select id, bugs.package, bugs.source, insts, title from bugs, popcon_src where bugs.source = popcon_src.source and id in (select id from bugs_rt_affects_testing_and_unstable) and id in (select id from bugs_tags where tag='patch') and severity >= 'serious' and bugs.source in ('#{spkgss}') order by id")
+sth.execute ; rows = sth.fetch_all
+
+puts "<h2>RC bugs tagged patch</h2>"
+puts "<table>"
+puts "<tr><th>bug</th><th>package</th><th>source</th><th>popcon</th><th>title</th></tr>"
+rows.each do |r|
+   puts "<tr><td><a href=\"http://bugs.debian.org/#{r['id']}\">#{r['id']}</a></td>"
+   puts "<td>#{r['package']}</td>"
+   puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a></td>"
+   puts "<td>#{r['insts']}</td>"
+   puts "<td>#{r['title']}</td>"
+end
+puts "</table>"
+sth.finish
+
+puts "<h2>RC bugs on packages with a newer version in Ubuntu, not tagged patch (possible patches)</h2>"
+puts "<table>"
+puts "<tr><th>bug</th><th>package</th><th>source</th><th>versions (D/U)</th><th>popcon</th><th>title</th></tr>"
+
+sth = dbh.prepare("WITH ubudeb AS (select distinct on (d.source, u.source) d.source as dsource, u.source as usource, d.version as dversion, u.version as uversion from sources_uniq d, ubuntu_sources u where d.release = 'sid' and d.distribution = 'debian' and u.release = 'lucid' and u.distribution = 'ubuntu' and u.source = d.source and u.version > d.version order by d.source asc, u.source asc, d.version desc)
+select id, bugs.package, bugs.source, title, dversion, uversion, insts from bugs, ubudeb, popcon_src where popcon_src.source = bugs.source and id in (select id from bugs_rt_affects_testing_and_unstable) and id in (select id from bugs_tags where tag='patch') and severity >= 'serious' and ubudeb.dsource = bugs.source and bugs.source in ('#{spkgss}') order by id")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+   puts "<tr><td><a href=\"http://bugs.debian.org/#{r['id']}\">#{r['id']}</a></td>"
+   puts "<td>#{r['package']}</td>"
+   puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a> <a href=\"https://launchpad.net/ubuntu/lucid/+source/#{r['source']}/+changelog\">UbCh</a></td>"
+   puts "<td>#{r['dversion']} / #{r['uversion']}</td>"
+   puts "<td>#{r['insts']}</td>"
+   puts "<td>#{r['title']}</td>"
+end
+puts "</table>"
+sth.finish


Property changes on: udd/web/cgi-bin/rcbugsl.cgi
___________________________________________________________________
Added: svn:executable
   + *

Added: udd/web/cgi-bin/ruby1.9.0.cgi
===================================================================
--- udd/web/cgi-bin/ruby1.9.0.cgi	                        (rev 0)
+++ udd/web/cgi-bin/ruby1.9.0.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -0,0 +1,27 @@
+#!/usr/bin/ruby -w
+
+require 'dbi'
+require 'pp'
+require 'uri'
+require 'net/http'
+
+puts "Content-type: text/plain\n\n"
+
+pkgs = `zgrep usr/lib/ruby/1.9.0 /org/mirrors/ftp.debian.org/ftp/dists/sid/Contents-i386.gz`.split(/\n/).map do |line|
+  line.chomp!
+  path, pkg = line.split(/\s+/)
+  sect, pkg = pkg.split('/')
+  pkg
+end
+pkgs.uniq!
+
+pp pkgs
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+
+spkgs = pkgs.join('\',\'')
+sth = dbh.prepare("select distinct source, package, version from packages
+where architecture in ('i386','all') and package in ('#{spkgs}') and release='sid' and distribution='debian' and source != 'ruby1.9'")
+sth.execute ; rows = sth.fetch_all
+pp rows
+exit(0)


Property changes on: udd/web/cgi-bin/ruby1.9.0.cgi
___________________________________________________________________
Added: svn:executable
   + *

Added: udd/web/cgi-bin/sources_rebuild.cgi
===================================================================
--- udd/web/cgi-bin/sources_rebuild.cgi	                        (rev 0)
+++ udd/web/cgi-bin/sources_rebuild.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -0,0 +1,15 @@
+#!/usr/bin/ruby -w
+# Used by Harvest at Ubuntu
+
+require 'dbi'
+
+puts "Content-type: text/plain\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+sth = dbh.prepare("select source, version
+from sources_uniq where distribution='debian' and release='sid' and component='main' and (architecture = 'all' or architecture = 'any' or architecture ~ 'amd64') order by source")
+sth.execute
+while row = sth.fetch do
+  puts "#{row['source']} #{row['version']} #{row['component']}"
+end
+sth.finish


Property changes on: udd/web/cgi-bin/sources_rebuild.cgi
___________________________________________________________________
Added: svn:executable
   + *

Modified: udd/web/cgi-bin/ubuntu_ftbfs.cgi
===================================================================
--- udd/web/cgi-bin/ubuntu_ftbfs.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/ubuntu_ftbfs.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -5,6 +5,8 @@
 require 'uri'
 require 'net/http'
 
+URELEASE='lucid'
+
 puts "Content-type: text/html\n\n"
 
 puts <<-EOF
@@ -38,7 +40,7 @@
 
 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 = 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
 

Modified: udd/web/cgi-bin/ubuntu_old_packages.cgi
===================================================================
--- udd/web/cgi-bin/ubuntu_old_packages.cgi	2010-02-21 10:22:56 UTC (rev 1692)
+++ udd/web/cgi-bin/ubuntu_old_packages.cgi	2010-02-21 10:28:52 UTC (rev 1693)
@@ -22,7 +22,7 @@
 join ubuntu_sources src2 using (source, version)
 left join ubuntu_popcon_src popcon using (source)
 where src1.component in ('universe', 'multiverse')
-and src1.release='lucid' and src2.release='hardy'
+and src1.release='#{RELEASE}' and src2.release='hardy'
 and src1.source not in
   (select source from sources where release = 'sid')
 and src1.source in
@@ -40,7 +40,7 @@
 join ubuntu_sources src2 using (source, version)
 left join ubuntu_popcon_src popcon using (source)
 where src1.component in ('universe', 'multiverse')
-and src1.release='lucid' and src2.release='hardy'
+and src1.release='#{RELEASE}' and src2.release='hardy'
 and src1.source not in
   (select source from sources where release = 'sid')
 and src1.source not in




More information about the Collab-qa-commits mailing list