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

Lucas Nussbaum lucas at alioth.debian.org
Thu Sep 24 16:01:58 UTC 2009


Author: lucas
Date: 2009-09-24 16:01:57 +0000 (Thu, 24 Sep 2009)
New Revision: 1590

Added:
   udd/web/cgi-bin/attic/
   udd/web/cgi-bin/attic/archive-state.cgi
   udd/web/cgi-bin/attic/maintainers.cgi
   udd/web/cgi-bin/attic/nmu_stats.cgi
   udd/web/cgi-bin/attic/orphaned_packages.cgi
   udd/web/cgi-bin/attic/package_bug_count.cgi
   udd/web/cgi-bin/attic/package_rc_bug_count.cgi
   udd/web/cgi-bin/attic/packages_in_unstable_but_not_in_testing_by_popcon.cgi
   udd/web/cgi-bin/attic/removal_candidates.cgi
   udd/web/cgi-bin/attic/source_higher_version_ubuntu_than_debian.cgi
   udd/web/cgi-bin/attic/source_in_ubuntu_but_not_in_debian.cgi
   udd/web/cgi-bin/attic/sources_in_etch_but_not_in_lenny.cgi
   udd/web/cgi-bin/attic/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
   udd/web/cgi-bin/attic/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi
   udd/web/cgi-bin/attic/ubuntu_stats.cgi
   udd/web/cgi-bin/attic/ubuntu_wrong_version.cgi
Removed:
   udd/web/cgi-bin/archive-state.cgi
   udd/web/cgi-bin/maintainers.cgi
   udd/web/cgi-bin/nmu_stats.cgi
   udd/web/cgi-bin/orphaned_packages.cgi
   udd/web/cgi-bin/package_bug_count.cgi
   udd/web/cgi-bin/package_rc_bug_count.cgi
   udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi
   udd/web/cgi-bin/removal_candidates.cgi
   udd/web/cgi-bin/source_higher_version_ubuntu_than_debian.cgi
   udd/web/cgi-bin/source_in_ubuntu_but_not_in_debian.cgi
   udd/web/cgi-bin/sources_in_etch_but_not_in_lenny.cgi
   udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
   udd/web/cgi-bin/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi
   udd/web/cgi-bin/ubuntu_stats.cgi
   udd/web/cgi-bin/ubuntu_wrong_version.cgi
Modified:
   udd/web/cgi-bin/bugs-binpkgs-pts.cgi
   udd/web/cgi-bin/bugs-removed-packages.cgi
   udd/web/cgi-bin/ubuntubugs.cgi
   udd/web/cgi-bin/ubuntupackages.cgi
Log:
cleanup UDD cgis

Deleted: udd/web/cgi-bin/archive-state.cgi
===================================================================
--- udd/web/cgi-bin/archive-state.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/archive-state.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,128 +0,0 @@
-#!/usr/bin/ruby -w
-require 'dbi'
-
-puts "Content-type: text/html\n\n"
-
-dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-
-puts "<html><body>"
-
-sth = dbh.prepare("SELECT count(*) 
-FROM sources
-WHERE distribution = 'debian' AND release = 'sid'")
-sth.execute
-nb_tot = sth.fetch_all[0][0].to_i
-puts "Packages in sid: #{nb_tot}"
-
-puts "<h1>Packages not maintained or co-maintained by DDs or teams</h1>"
-sth = dbh.prepare("SELECT count(*) 
-FROM sources
-WHERE distribution = 'debian' AND release = 'sid'
-AND sources.source NOT IN (
-SELECT sources.source
-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)
-OR maintainer_email ~ '.*@lists.(alioth.)?debian.org'
-OR email ~ '.*@lists.(alioth.)?debian.org'
-))")
-sth.execute
-nb_nondd = sth.fetch_all[0][0]
-puts "#{nb_nondd} packages (#{nb_nondd*100/nb_tot}%)<br/>"
-sth = dbh.prepare("SELECT sources.source, insts
-FROM sources, popcon_src
-WHERE distribution = 'debian' AND release = 'sid'
-AND sources.source = popcon_src.source
-AND sources.source NOT IN (
-SELECT sources.source
-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)
-OR maintainer_email ~ '.*@lists.(alioth.)?debian.org'
-OR email ~ '.*@lists.(alioth.)?debian.org'
-)
-) ORDER BY insts DESC LIMIT 20")
-sth.execute
-puts "Top 20 packages, sorted by popcon installations"
-puts "<table>"
-sth.fetch_all.each do |r|
-  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-### ORPHANED
-puts "<h1>Orphaned packages</h1>"
-sth = dbh.prepare("select count(*) from sources
-                  where distribution='debian' and release='sid'
-                  and source in (select source from orphaned_packages where type in ('O', 'ITA'))")
-sth.execute
-nb_orph = sth.fetch_all[0][0]
-puts "#{nb_orph} packages (#{nb_orph*100/nb_tot}%)<br/>"
-sth = dbh.prepare("select sources.source, insts from sources, popcon_src
-                  where distribution='debian' and release='sid'
-                  and sources.source = popcon_src.source
-                  and sources.source in (select source from orphaned_packages where type in ('O', 'ITA')) order by insts desc limit 20")
-sth.execute
-puts "Top 20 packages, sorted by popcon installations"
-puts "<table>"
-sth.fetch_all.each do |r|
-  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-puts "<h1>RC-buggy packages in unstable</h1>"
-sth = dbh.prepare("select count(*) from sources
-                  where distribution='debian' and release='sid'
-                  and source in (select bugs.source from bugs_rt_affects_unstable brt, bugs where bugs.id = brt.id and bugs.severity >= 'serious')")
-sth.execute
-nb_rc = sth.fetch_all[0][0]
-puts "#{nb_rc} packages (#{nb_rc*100/nb_tot}%)<br/>"
-sth = dbh.prepare("select sources.source, insts from sources, popcon_src
-                  where distribution='debian' and release='sid'
-                  and sources.source = popcon_src.source
-                  and sources.source in (select bugs.source from bugs_rt_affects_unstable brt, bugs where bugs.id = brt.id and bugs.severity >= 'serious') order by insts desc limit 20")
-sth.execute
-puts "Top 20 packages, sorted by popcon installations"
-puts "<table>"
-sth.fetch_all.each do |r|
-  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-puts "<h1>Not Ubuntu-specific, not in Debian</h1>"
-sth = dbh.prepare("select count(*) from ubuntu_sources us, ubuntu_popcon_src
-WHERE us.distribution = 'ubuntu'
-AND us.release = 'karmic'
-AND us.source = ubuntu_popcon_src.source
-AND us.source !~ '^language-(support|pack)-.*'
-AND us.source !~ '^kde-l10n-.*'
-AND us.source !~ 'ubuntu'
-AND us.source !~ 'launchpad'
-AND us.source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny'))")
-sth.execute
-nb_u = sth.fetch_all[0][0]
-puts "#{nb_u} packages (#{nb_u*100/nb_tot}%)<br/>"
-sth = dbh.prepare("select us.source, insts from ubuntu_sources us, ubuntu_popcon_src
-WHERE us.distribution = 'ubuntu'
-AND us.release = 'karmic'
-AND us.source = ubuntu_popcon_src.source
-AND us.source !~ '^language-(support|pack)-.*'
-AND us.source !~ '^kde-l10n-.*'
-AND us.source !~ 'ubuntu'
-AND us.source !~ 'launchpad'
-AND us.source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny'))
-ORDER BY INSTS DESC")
-sth.execute
-puts "Top 20 packages, sorted by popcon installations"
-puts "<table>"
-sth.fetch_all.each do |r|
-  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-
-sth.finish

Copied: udd/web/cgi-bin/attic/archive-state.cgi (from rev 1582, udd/web/cgi-bin/archive-state.cgi)
===================================================================
--- udd/web/cgi-bin/attic/archive-state.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/archive-state.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,128 @@
+#!/usr/bin/ruby -w
+require 'dbi'
+
+puts "Content-type: text/html\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+
+puts "<html><body>"
+
+sth = dbh.prepare("SELECT count(*) 
+FROM sources
+WHERE distribution = 'debian' AND release = 'sid'")
+sth.execute
+nb_tot = sth.fetch_all[0][0].to_i
+puts "Packages in sid: #{nb_tot}"
+
+puts "<h1>Packages not maintained or co-maintained by DDs or teams</h1>"
+sth = dbh.prepare("SELECT count(*) 
+FROM sources
+WHERE distribution = 'debian' AND release = 'sid'
+AND sources.source NOT IN (
+SELECT sources.source
+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)
+OR maintainer_email ~ '.*@lists.(alioth.)?debian.org'
+OR email ~ '.*@lists.(alioth.)?debian.org'
+))")
+sth.execute
+nb_nondd = sth.fetch_all[0][0]
+puts "#{nb_nondd} packages (#{nb_nondd*100/nb_tot}%)<br/>"
+sth = dbh.prepare("SELECT sources.source, insts
+FROM sources, popcon_src
+WHERE distribution = 'debian' AND release = 'sid'
+AND sources.source = popcon_src.source
+AND sources.source NOT IN (
+SELECT sources.source
+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)
+OR maintainer_email ~ '.*@lists.(alioth.)?debian.org'
+OR email ~ '.*@lists.(alioth.)?debian.org'
+)
+) ORDER BY insts DESC LIMIT 20")
+sth.execute
+puts "Top 20 packages, sorted by popcon installations"
+puts "<table>"
+sth.fetch_all.each do |r|
+  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+### ORPHANED
+puts "<h1>Orphaned packages</h1>"
+sth = dbh.prepare("select count(*) from sources
+                  where distribution='debian' and release='sid'
+                  and source in (select source from orphaned_packages where type in ('O', 'ITA'))")
+sth.execute
+nb_orph = sth.fetch_all[0][0]
+puts "#{nb_orph} packages (#{nb_orph*100/nb_tot}%)<br/>"
+sth = dbh.prepare("select sources.source, insts from sources, popcon_src
+                  where distribution='debian' and release='sid'
+                  and sources.source = popcon_src.source
+                  and sources.source in (select source from orphaned_packages where type in ('O', 'ITA')) order by insts desc limit 20")
+sth.execute
+puts "Top 20 packages, sorted by popcon installations"
+puts "<table>"
+sth.fetch_all.each do |r|
+  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+puts "<h1>RC-buggy packages in unstable</h1>"
+sth = dbh.prepare("select count(*) from sources
+                  where distribution='debian' and release='sid'
+                  and source in (select bugs.source from bugs_rt_affects_unstable brt, bugs where bugs.id = brt.id and bugs.severity >= 'serious')")
+sth.execute
+nb_rc = sth.fetch_all[0][0]
+puts "#{nb_rc} packages (#{nb_rc*100/nb_tot}%)<br/>"
+sth = dbh.prepare("select sources.source, insts from sources, popcon_src
+                  where distribution='debian' and release='sid'
+                  and sources.source = popcon_src.source
+                  and sources.source in (select bugs.source from bugs_rt_affects_unstable brt, bugs where bugs.id = brt.id and bugs.severity >= 'serious') order by insts desc limit 20")
+sth.execute
+puts "Top 20 packages, sorted by popcon installations"
+puts "<table>"
+sth.fetch_all.each do |r|
+  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+puts "<h1>Not Ubuntu-specific, not in Debian</h1>"
+sth = dbh.prepare("select count(*) from ubuntu_sources us, ubuntu_popcon_src
+WHERE us.distribution = 'ubuntu'
+AND us.release = 'karmic'
+AND us.source = ubuntu_popcon_src.source
+AND us.source !~ '^language-(support|pack)-.*'
+AND us.source !~ '^kde-l10n-.*'
+AND us.source !~ 'ubuntu'
+AND us.source !~ 'launchpad'
+AND us.source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny'))")
+sth.execute
+nb_u = sth.fetch_all[0][0]
+puts "#{nb_u} packages (#{nb_u*100/nb_tot}%)<br/>"
+sth = dbh.prepare("select us.source, insts from ubuntu_sources us, ubuntu_popcon_src
+WHERE us.distribution = 'ubuntu'
+AND us.release = 'karmic'
+AND us.source = ubuntu_popcon_src.source
+AND us.source !~ '^language-(support|pack)-.*'
+AND us.source !~ '^kde-l10n-.*'
+AND us.source !~ 'ubuntu'
+AND us.source !~ 'launchpad'
+AND us.source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny'))
+ORDER BY INSTS DESC")
+sth.execute
+puts "Top 20 packages, sorted by popcon installations"
+puts "<table>"
+sth.fetch_all.each do |r|
+  puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+
+sth.finish


Property changes on: udd/web/cgi-bin/attic/archive-state.cgi
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mergeinfo
   + 

Copied: udd/web/cgi-bin/attic/maintainers.cgi (from rev 1582, udd/web/cgi-bin/maintainers.cgi)
===================================================================
--- udd/web/cgi-bin/attic/maintainers.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/maintainers.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,152 @@
+#!/usr/bin/ruby -w
+require 'dbi'
+
+puts "Content-type: text/html\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+# unique emails in Maintainers
+# unique emails in Maintainers + Uploaders
+
+puts "<html><body>"
+
+puts "<h1>Releases, source packages and maintainers</h1>"
+# source packages
+sth = dbh.prepare("
+select release, count(*) from sources
+where distribution = 'debian'
+and release in ('etch', 'lenny', 'sid')
+and component = 'main'
+group by release")
+sth.execute
+srcpkgs = {}
+sth.fetch_all.each do |r|
+srcpkgs[r[0]] = r[1]
+end
+
+# co-maintained source packages (at least one uploader) + %
+sth = dbh.prepare("
+select release, count(*) from sources
+where distribution = 'debian'
+and release in ('etch', 'lenny', 'sid')
+and component = 'main'
+and uploaders is not null
+group by release")
+sth.execute
+com_srcpkgs = {}
+sth.fetch_all.each do |r|
+com_srcpkgs[r[0]] = r[1]
+end
+
+# unique emails in Maintainers
+sth = dbh.prepare("
+select release, count(distinct maintainer_email) from sources
+where distribution = 'debian'
+and component = 'main'
+group by release")
+sth.execute
+maints = {}
+sth.fetch_all.each do |r|
+maints[r[0]] = r[1]
+end
+
+# unique emails in Maintainers + Uploaders
+sth = dbh.prepare("select release, count(distinct email) from (
+select release, maintainer_email as email from sources
+where distribution = 'debian'
+and component = 'main'
+union
+select release, email from uploaders 
+where distribution = 'debian'
+and component = 'main') as foo group by release")
+sth.execute
+comaints = {}
+sth.fetch_all.each do |r|
+comaints[r[0]] = r[1]
+end
+
+puts <<-EOF
+<table border='1'><tr><th>Distribution</th><th>etch</th><th>lenny</th><th>sid</th></tr>
+<tr><th>Source packages</th><td>#{srcpkgs['etch']}</td><td>#{srcpkgs['lenny']}</td><td>#{srcpkgs['sid']}</td></tr>
+<tr><th>Co-maintained source packages (at least one uploader)</th><td>#{com_srcpkgs['etch']} (#{(com_srcpkgs['etch'].to_f/srcpkgs['etch']*100).to_i}%)</td><td>#{com_srcpkgs['lenny']} (#{(com_srcpkgs['lenny'].to_f/srcpkgs['lenny']*100).to_i}%)</td><td>#{com_srcpkgs['sid']} (#{(com_srcpkgs['sid'].to_f/srcpkgs['sid']*100).to_i}%)</td></tr>
+<tr><th>Maintainers (=different emails in Maintainer:) ; Packages per maintainer</th>
+<td>#{maints['etch']} (#{"%.2f"%(srcpkgs['etch'].to_f/maints['etch'])})</td>
+<td>#{maints['lenny']} (#{"%.2f"%(srcpkgs['lenny'].to_f/maints['lenny'])})</td>
+<td>#{maints['sid']} (#{"%.2f"%(srcpkgs['sid'].to_f/maints['sid'])})</td></tr>
+<tr><th>Maintainers, inc. Uploaders (different emails in Maintainer: or Uploaders:) ; Packages per maintainer</th>
+<td>#{comaints['etch']} (#{"%.2f"%(srcpkgs['etch'].to_f/comaints['etch'])})</td>
+<td>#{comaints['lenny']} (#{"%.2f"%(srcpkgs['lenny'].to_f/comaints['lenny'])})</td>
+<td>#{comaints['sid']} (#{"%.2f"%(srcpkgs['sid'].to_f/comaints['sid'])})</td></tr>
+</table>
+EOF
+
+puts "<h1>Maintainers that maintain a lot of packages</h1>"
+puts "(= number of packages per email listed in Maintainer: or Uploaders:)<br/>"
+sth = dbh.prepare("select email, count(distinct source) from (
+select maintainer_email as email, source from sources
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main'
+union
+select email, source from uploaders 
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main') as foo
+group by email having count(distinct source) >= 10 order by count desc limit 50")
+sth.execute
+puts "<table border='1'><tr><th>email</th><th>nb of packages</th></tr>"
+sth.fetch_all.each do |r|
+puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+puts "<h1>Maintainers that maintain a lot of packages <b>alone</b></h1>"
+puts "(= number of packages per email listed in Maintainer:, excluding packages with uploaders)<br/>"
+sth = dbh.prepare("select maintainer_email as email, count(source) from sources
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main'
+and uploaders is null
+group by email having count(distinct source) >= 10 order by count desc limit 50")
+sth.execute
+puts "<table border='1'><tr><th>email</th><th>nb of packages</th></tr>"
+sth.fetch_all.each do |r|
+puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+puts "<h1>Maintainers with an high workload</h1>"
+puts "We assume that the maintainance of a package is shared equally amongst all co-maintainers. We assign a <i>cost</i> of 1 to packages maintained without co-maintainers, 0.5 to packages maintained by 2 co-maintainers, ..., 0.1 to packages maintained by 10 co-maintainers.<br>Of course, that's broken because team emails only count as 1 co-maintainer. But it's better than nothing. (or not?)"
+
+sth = dbh.prepare("create temporary table costs as select source, 1.0/count(distinct email) as cost from (
+select maintainer_email as email, source from sources
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main'
+union
+select email, source from uploaders 
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main') as foo
+group by source")
+sth.execute
+
+sth = dbh.prepare("select email, sum(cost) as total_cost from (
+select maintainer_email as email, source from sources
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main'
+union
+select email, source from uploaders 
+where release = 'sid'
+and distribution = 'debian'
+and component = 'main') as maintsrcs, costs
+where costs.source = maintsrcs.source
+group by email having sum(cost) >= 10 order by total_cost desc limit 70")
+sth.execute
+puts "<table border='1'><tr><th>email</th><th>total <i>cost</i> of all (co-)maintained packages</th></tr>"
+sth.fetch_all.each do |r|
+puts "<tr><td>#{r[0]}</td><td>#{"%.2f"%(r[1])}</td></tr>"
+end
+puts "</table>"
+puts "</body></html>"
+sth.finish


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

Copied: udd/web/cgi-bin/attic/nmu_stats.cgi (from rev 1582, udd/web/cgi-bin/nmu_stats.cgi)
===================================================================
--- udd/web/cgi-bin/attic/nmu_stats.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/nmu_stats.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,41 @@
+#!/usr/bin/ruby -w
+
+require 'dbi'
+require 'pp'
+
+puts "Content-type: text/html\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+sth = dbh.prepare("select changed_by, count(*) cnt from
+upload_history uh, sources s
+where s.distribution='debian' and s.release='sid'
+and s.source = uh.source and s.version = uh.version
+and uh.nmu
+and uh.date > current_timestamp - interval '2 months'
+group by changed_by having count(*) >= 2 order by cnt desc")
+sth.execute ; rows = sth.fetch_all
+
+puts "<h1>People having done more than 2 NMUs over the last 2 months (only uploads still in the archive)</h1>"
+puts "<table>"
+rows.each do |r|
+puts "<tr><td>#{r[0].gsub('<','&lt;').gsub('>','&gt;')}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+
+sth = dbh.prepare("select changed_by, count(*) cnt from
+upload_history uh, sources s
+where s.distribution='debian' and s.release='sid'
+and s.source = uh.source and s.version = uh.version
+and uh.nmu
+group by changed_by order by cnt desc")
+sth.execute ; rows = sth.fetch_all
+
+puts "<h1>NMUs uploaded currently in the archive</h1>"
+puts "<table>"
+rows.each do |r|
+puts "<tr><td>#{r[0].gsub('<','&lt;').gsub('>','&gt;')}</td><td>#{r[1]}</td></tr>"
+end
+puts "</table>"
+
+sth.finish


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

Copied: udd/web/cgi-bin/attic/orphaned_packages.cgi (from rev 1582, udd/web/cgi-bin/orphaned_packages.cgi)
===================================================================
--- udd/web/cgi-bin/attic/orphaned_packages.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/orphaned_packages.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,26 @@
+#!/usr/bin/ruby -w
+require 'dbi'
+
+puts "Content-type: text/html\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+
+puts "<html><body>"
+
+sth = dbh.prepare("select sources.source, insts, date(op.orphaned_time), op.type, op.bug
+from sources, popcon_src, orphaned_packages op, bugs b
+where sources.source = popcon_src.source
+and distribution = 'debian' and release = 'sid'
+and sources.source = op.source
+and b.id = op.bug
+and op.type in ('O', 'ITA')
+and insts < 500
+and date(op.orphaned_time) < '2008-07-24'
+and date(b.last_modified) < '2008-07-24'")
+sth.execute
+puts "<table>"
+sth.fetch_all.each do |r|
+  puts "<tr><td><a href=\"http://packages.qa.debian.org/#{r[0]}\">#{r[0]}</a></td><td>#{r[1]}</td><td>#{r[2]}</td><td><a href=\"http://bugs.debian.org/#{r[4]}\">#{r[3]}</a></td></tr>"
+end
+puts "</table>"
+sth.finish


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

Copied: udd/web/cgi-bin/attic/package_bug_count.cgi (from rev 1582, udd/web/cgi-bin/package_bug_count.cgi)
===================================================================
--- udd/web/cgi-bin/attic/package_bug_count.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/package_bug_count.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+	SELECT package, COUNT(id) AS nr FROM bugs
+	WHERE
+		NOT (affects_stable OR affects_testing OR affects_unstable)
+		AND NOT EXISTS (SELECT 1 FROM bugs_tags WHERE bugs_tags.id = bugs.id AND bugs_tags.tag = 'fixed')
+	GROUP BY package ORDER BY nr DESC
+EOF
+	);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+}
+


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

Copied: udd/web/cgi-bin/attic/package_rc_bug_count.cgi (from rev 1582, udd/web/cgi-bin/package_rc_bug_count.cgi)
===================================================================
--- udd/web/cgi-bin/attic/package_rc_bug_count.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/package_rc_bug_count.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+SELECT b.package, COUNT(b.id)
+FROM bugs b
+WHERE 
+        b.severity >= 'serious'
+    AND 
+        b.affects_testing
+    AND(
+            NOT EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag IN ('sid', 'sarge', 'etch', 'lenny', 'experimental'))
+        OR
+                EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag = 'squeeze')
+    )
+    AND NOT EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag = 'squeeze-ignore')
+    AND(
+            EXISTS (SELECT package FROM packages p WHERE p.package = b.package AND p.distribution = 'debian' AND p.release = 'squeeze')
+        OR
+            EXISTS (SELECT source FROM sources s WHERE s.source = b.package AND s.distribution = 'debian' AND s.release = 'squeeze')
+    )
+GROUP BY b.package
+EOF
+	);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+}
+


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

Copied: udd/web/cgi-bin/attic/packages_in_unstable_but_not_in_testing_by_popcon.cgi (from rev 1582, udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi)
===================================================================
--- udd/web/cgi-bin/attic/packages_in_unstable_but_not_in_testing_by_popcon.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/packages_in_unstable_but_not_in_testing_by_popcon.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+SELECT DISTINCT pkgs.package, insts
+FROM packages_summary pkgs, popcon
+WHERE pkgs.release = 'sid' AND pkgs.package NOT IN
+(SELECT package FROM packages_summary WHERE release = 'squeeze')
+AND popcon.package = pkgs.package ORDER BY insts DESC;
+EOF
+	);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+}
+


Property changes on: udd/web/cgi-bin/attic/packages_in_unstable_but_not_in_testing_by_popcon.cgi
___________________________________________________________________
Added: svn:mergeinfo
   + 

Copied: udd/web/cgi-bin/attic/removal_candidates.cgi (from rev 1582, udd/web/cgi-bin/removal_candidates.cgi)
===================================================================
--- udd/web/cgi-bin/attic/removal_candidates.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/removal_candidates.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $s = <<EOF
+select sources.source, id, insts, arrival, last_modified, title
+from sources, bugs, popcon_src
+where sources.distribution = 'debian' and sources.release = 'squeeze'
+and bugs.source = sources.source
+and id in (select id from bugs_rt_affects_testing_and_unstable)
+and bugs.severity >= 'serious'
+and arrival < (NOW() - interval '14 DAYS')
+and sources.source = popcon_src.source
+and popcon_src.insts < 2000
+order by insts ASC
+EOF
+;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare($s);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+print "$s\n\n";
+while(my @row = $sth->fetchrow_array) {
+	$" = "\t";
+	print "@row.\n";
+}
+


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

Copied: udd/web/cgi-bin/attic/source_higher_version_ubuntu_than_debian.cgi (from rev 1582, udd/web/cgi-bin/source_higher_version_ubuntu_than_debian.cgi)
===================================================================
--- udd/web/cgi-bin/attic/source_higher_version_ubuntu_than_debian.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/source_higher_version_ubuntu_than_debian.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,51 @@
+#!/usr/bin/python                                 
+#
+# Author:    Sandro Tosi <morph at debian.org>
+# Date:	     2009-09-18
+# Copyright: Copyright (C) 2009 Sandro Tosi <morph at debian.org>
+# License:   Public Domain
+#
+# Extract from UDD the source packages both in Debian and Ubuntu with higher
+# version in Ubuntu than in Debian
+
+# module to access PostgreSQL databases
+import psycopg2
+
+# connect to UDD database
+conn = psycopg2.connect(database="udd", port=5441, host="localhost", user="guest")
+
+# prepare a cursor                     
+cur = conn.cursor()                    
+
+# this is the query we'll be making
+query = """                        
+select debian.source, debian.version, ubuntu.version
+  from (select source, max(version) as version from sources group by 1) debian,
+       (select source, max(version) as version from ubuntu_sources group by 1) ubuntu
+ where debian.source = ubuntu.source
+   and debian.version < ubuntu.version
+ order by 1"""
+
+# execute the query
+cur.execute(query)
+
+# retrieve the whole result set
+data = cur.fetchall()
+
+# close cursor and connection
+cur.close()
+conn.close()
+
+# print results
+
+# CGI Content-type
+print "Content-type: text/plain\n\n"
+
+# heading
+print "Source packages with a higher version in Ubuntu than in Debian\n"
+print "%30s %25s %25s" % ('Source Package Name', 'Debian Version', 'Ubuntu Version')
+print "-"*82
+
+# actual data
+for row in data:
+    print "%30s %25s %25s" % row


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

Copied: udd/web/cgi-bin/attic/source_in_ubuntu_but_not_in_debian.cgi (from rev 1582, udd/web/cgi-bin/source_in_ubuntu_but_not_in_debian.cgi)
===================================================================
--- udd/web/cgi-bin/attic/source_in_ubuntu_but_not_in_debian.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/source_in_ubuntu_but_not_in_debian.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,49 @@
+#!/usr/bin/python                                 
+#
+# Author:    Sandro Tosi <morph at debian.org>
+# Date:	     2009-09-18
+# Copyright: Copyright (C) 2009 Sandro Tosi <morph at debian.org>
+# License:   Public Domain
+#
+# Extract from UDD the source packages in Ubuntu but not in Debian
+
+# module to access PostgreSQL databases
+import psycopg2
+
+# connect to UDD database
+conn = psycopg2.connect(database="udd", port=5441, host="localhost", user="guest")
+
+# prepare a cursor                     
+cur = conn.cursor()                    
+
+# this is the query we'll be making
+query = """                        
+select source, max(version)
+  from ubuntu_sources
+ where source not in (select distinct source from sources)
+ group by source
+ order by 1"""
+
+# execute the query
+cur.execute(query)
+
+# retrieve the whole result set
+data = cur.fetchall()
+
+# close cursor and connection
+cur.close()
+conn.close()
+
+# print results
+
+# CGI Content-type
+print "Content-type: text/plain\n\n"
+
+# heading
+print "Source packages in Ubuntu but not in Debian\n"
+print "%35s %25s" % ('Source Package Name', 'Ubuntu Version')
+print "-"*61
+
+# actual data
+for row in data:
+    print "%35s %25s" % row


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

Copied: udd/web/cgi-bin/attic/sources_in_etch_but_not_in_lenny.cgi (from rev 1582, udd/web/cgi-bin/sources_in_etch_but_not_in_lenny.cgi)
===================================================================
--- udd/web/cgi-bin/attic/sources_in_etch_but_not_in_lenny.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/sources_in_etch_but_not_in_lenny.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+	select insts, sources.source
+	from sources, popcon_src
+	where release='etch'
+	and sources.source not in
+	   (select source from sources where release='lenny')
+	   and sources.source = popcon_src.source
+	   order by insts desc;
+EOF
+);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+}
+


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

Copied: udd/web/cgi-bin/attic/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi (from rev 1582, udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi)
===================================================================
--- udd/web/cgi-bin/attic/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+	SELECT DISTINCT ubu.source, insts
+        FROM (SELECT DISTINCT source FROM ubuntu_sources
+                WHERE release = 'karmic')
+          AS ubu,
+             ubuntu_popcon_src
+        WHERE NOT EXISTS (SELECT * FROM sources WHERE distribution = 'debian'
+                          and source = ubu.source)
+              AND ubuntu_popcon_src.source = ubu.source
+              AND ubu.source !~ '^language-(support|pack)-.*'
+              AND ubu.source !~ '^kde-l10n-.*'
+              AND ubu.source !~ 'ubuntu'
+              AND ubu.source !~ 'launchpad'
+         ORDER BY insts DESC;
+EOF
+	);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+my $n = 0;
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+	$n++;
+}
+print "\n\n# Packages: $n\n";
+


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

Copied: udd/web/cgi-bin/attic/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi (from rev 1582, udd/web/cgi-bin/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi)
===================================================================
--- udd/web/cgi-bin/attic/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
+my $sth = $dbh->prepare(<<EOF
+SELECT DISTINCT unstable.source, insts
+FROM (SELECT DISTINCT source FROM sources
+WHERE distribution = 'debian' and release = 'sid')
+AS unstable,
+popcon_src
+WHERE unstable.source NOT IN (SELECT source FROM sources WHERE distribution = 'debian'
+AND release = 'squeeze')
+AND popcon_src.source = unstable.source ORDER BY insts DESC;
+EOF
+	);
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+	my ($package, $score) = @row;
+	print "$package\t$score\n";
+}
+


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

Copied: udd/web/cgi-bin/attic/ubuntu_stats.cgi (from rev 1582, udd/web/cgi-bin/ubuntu_stats.cgi)
===================================================================
--- udd/web/cgi-bin/attic/ubuntu_stats.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/ubuntu_stats.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,155 @@
+#!/usr/bin/ruby -w
+
+require 'dbi'
+require 'pp'
+RELEASE='jaunty'
+
+puts "Content-type: text/plain\n\n"
+
+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'")
+sth.execute ; rows = sth.fetch_all
+allpkgs = rows[0][0]
+puts "Source packages in Debian: #{allpkgs}"
+
+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")
+sth.execute ; rows = sth.fetch_all
+pp rows
+
+puts "Not Ubuntu specific, not in debian:"
+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'))
+ group by component")
+sth.execute ; rows = sth.fetch_all
+pp rows
+
+puts "Not Ubuntu specific, not in debian, version !~ /ubuntu/ (FAIL!):"
+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'
+ group by component")
+sth.execute ; rows = sth.fetch_all
+pp rows
+
+puts "Also in Debian:"
+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'))
+ group by component")
+sth.execute ; rows = sth.fetch_all
+pp rows
+
+puts "Also in Debian, not diverged (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
+
+
+puts "Also in Debian, diverged (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
+
+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'
+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' order by source")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  print  r[0] + ' '
+end
+puts
+puts
+
+puts "diverged+new upstream (universe):"
+sth = dbh.prepare("select source from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' and component = 'universe'
+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' order by source")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  print  r[0] + ' '
+end
+puts
+
+puts "diverged+new upstream, newer than in squeeze (main):"
+sth = dbh.prepare("select u.source, u.version, d.version from ubuntu_sources u, sources d
+where u.distribution = 'ubuntu' and u.release = '#{RELEASE}' and u.component = 'main'
+and d.distribution = 'debian' and d.release = 'squeeze'
+AND u.source !~ '^language-(support|pack)-.*' AND u.source !~ '^kde-l10n-.*' AND u.source !~ 'ubuntu' AND u.source !~ 'launchpad'
+AND u.source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
+AND u.version ~ '-0ubuntu'
+AND u.source = d.source
+AND u.version > d.version
+order by source")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  print  r[0] + ' '
+end
+puts
+puts
+
+puts "diverged+new upstream, newer than in squeeze (universe):"
+sth = dbh.prepare("select u.source, u.version, d.version from ubuntu_sources u, sources d
+where u.distribution = 'ubuntu' and u.release = '#{RELEASE}' and u.component = 'universe'
+and d.distribution = 'debian' and d.release = 'squeeze'
+AND u.source !~ '^language-(support|pack)-.*' AND u.source !~ '^kde-l10n-.*' AND u.source !~ 'ubuntu' AND u.source !~ 'launchpad'
+AND u.source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
+AND u.version ~ '-0ubuntu'
+AND u.source = d.source
+AND u.version > d.version
+order by source")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  print  r[0] + ' '
+end
+puts
+puts
+
+
+
+
+sth.finish


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

Copied: udd/web/cgi-bin/attic/ubuntu_wrong_version.cgi (from rev 1582, udd/web/cgi-bin/ubuntu_wrong_version.cgi)
===================================================================
--- udd/web/cgi-bin/attic/ubuntu_wrong_version.cgi	                        (rev 0)
+++ udd/web/cgi-bin/attic/ubuntu_wrong_version.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -0,0 +1,16 @@
+#!/usr/bin/ruby -w
+
+require 'dbi'
+require 'pp'
+RELEASE='karmic'
+
+puts "Content-type: text/plain\n\n"
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+s = "select source, version, component from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' AND source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny')) AND version !~ 'ubuntu' and version ~ '-' order by component, source"
+sth = dbh.prepare(s)
+sth.execute ; rows = sth.fetch_all
+puts "# #{s}"
+rows.each do |r|
+  puts "#{r.join(' ')}"
+end


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

Modified: udd/web/cgi-bin/bugs-binpkgs-pts.cgi
===================================================================
--- udd/web/cgi-bin/bugs-binpkgs-pts.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/bugs-binpkgs-pts.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,6 +1,6 @@
 #!/usr/bin/ruby -w
 
-# Used by DDPO and the PTS
+# Used by the PTS
 
 require 'dbi'
 

Modified: udd/web/cgi-bin/bugs-removed-packages.cgi
===================================================================
--- udd/web/cgi-bin/bugs-removed-packages.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/bugs-removed-packages.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,4 +1,5 @@
 #!/usr/bin/ruby -w
+# Used by Marco Rodriguez to track bugs in removed packages
 require 'dbi'
 
 # see merkel:/org/bugs.debian.org/etc/pseudo-packages.description

Deleted: udd/web/cgi-bin/maintainers.cgi
===================================================================
--- udd/web/cgi-bin/maintainers.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/maintainers.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,152 +0,0 @@
-#!/usr/bin/ruby -w
-require 'dbi'
-
-puts "Content-type: text/html\n\n"
-
-dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-# unique emails in Maintainers
-# unique emails in Maintainers + Uploaders
-
-puts "<html><body>"
-
-puts "<h1>Releases, source packages and maintainers</h1>"
-# source packages
-sth = dbh.prepare("
-select release, count(*) from sources
-where distribution = 'debian'
-and release in ('etch', 'lenny', 'sid')
-and component = 'main'
-group by release")
-sth.execute
-srcpkgs = {}
-sth.fetch_all.each do |r|
-srcpkgs[r[0]] = r[1]
-end
-
-# co-maintained source packages (at least one uploader) + %
-sth = dbh.prepare("
-select release, count(*) from sources
-where distribution = 'debian'
-and release in ('etch', 'lenny', 'sid')
-and component = 'main'
-and uploaders is not null
-group by release")
-sth.execute
-com_srcpkgs = {}
-sth.fetch_all.each do |r|
-com_srcpkgs[r[0]] = r[1]
-end
-
-# unique emails in Maintainers
-sth = dbh.prepare("
-select release, count(distinct maintainer_email) from sources
-where distribution = 'debian'
-and component = 'main'
-group by release")
-sth.execute
-maints = {}
-sth.fetch_all.each do |r|
-maints[r[0]] = r[1]
-end
-
-# unique emails in Maintainers + Uploaders
-sth = dbh.prepare("select release, count(distinct email) from (
-select release, maintainer_email as email from sources
-where distribution = 'debian'
-and component = 'main'
-union
-select release, email from uploaders 
-where distribution = 'debian'
-and component = 'main') as foo group by release")
-sth.execute
-comaints = {}
-sth.fetch_all.each do |r|
-comaints[r[0]] = r[1]
-end
-
-puts <<-EOF
-<table border='1'><tr><th>Distribution</th><th>etch</th><th>lenny</th><th>sid</th></tr>
-<tr><th>Source packages</th><td>#{srcpkgs['etch']}</td><td>#{srcpkgs['lenny']}</td><td>#{srcpkgs['sid']}</td></tr>
-<tr><th>Co-maintained source packages (at least one uploader)</th><td>#{com_srcpkgs['etch']} (#{(com_srcpkgs['etch'].to_f/srcpkgs['etch']*100).to_i}%)</td><td>#{com_srcpkgs['lenny']} (#{(com_srcpkgs['lenny'].to_f/srcpkgs['lenny']*100).to_i}%)</td><td>#{com_srcpkgs['sid']} (#{(com_srcpkgs['sid'].to_f/srcpkgs['sid']*100).to_i}%)</td></tr>
-<tr><th>Maintainers (=different emails in Maintainer:) ; Packages per maintainer</th>
-<td>#{maints['etch']} (#{"%.2f"%(srcpkgs['etch'].to_f/maints['etch'])})</td>
-<td>#{maints['lenny']} (#{"%.2f"%(srcpkgs['lenny'].to_f/maints['lenny'])})</td>
-<td>#{maints['sid']} (#{"%.2f"%(srcpkgs['sid'].to_f/maints['sid'])})</td></tr>
-<tr><th>Maintainers, inc. Uploaders (different emails in Maintainer: or Uploaders:) ; Packages per maintainer</th>
-<td>#{comaints['etch']} (#{"%.2f"%(srcpkgs['etch'].to_f/comaints['etch'])})</td>
-<td>#{comaints['lenny']} (#{"%.2f"%(srcpkgs['lenny'].to_f/comaints['lenny'])})</td>
-<td>#{comaints['sid']} (#{"%.2f"%(srcpkgs['sid'].to_f/comaints['sid'])})</td></tr>
-</table>
-EOF
-
-puts "<h1>Maintainers that maintain a lot of packages</h1>"
-puts "(= number of packages per email listed in Maintainer: or Uploaders:)<br/>"
-sth = dbh.prepare("select email, count(distinct source) from (
-select maintainer_email as email, source from sources
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main'
-union
-select email, source from uploaders 
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main') as foo
-group by email having count(distinct source) >= 10 order by count desc limit 50")
-sth.execute
-puts "<table border='1'><tr><th>email</th><th>nb of packages</th></tr>"
-sth.fetch_all.each do |r|
-puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-puts "<h1>Maintainers that maintain a lot of packages <b>alone</b></h1>"
-puts "(= number of packages per email listed in Maintainer:, excluding packages with uploaders)<br/>"
-sth = dbh.prepare("select maintainer_email as email, count(source) from sources
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main'
-and uploaders is null
-group by email having count(distinct source) >= 10 order by count desc limit 50")
-sth.execute
-puts "<table border='1'><tr><th>email</th><th>nb of packages</th></tr>"
-sth.fetch_all.each do |r|
-puts "<tr><td>#{r[0]}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-puts "<h1>Maintainers with an high workload</h1>"
-puts "We assume that the maintainance of a package is shared equally amongst all co-maintainers. We assign a <i>cost</i> of 1 to packages maintained without co-maintainers, 0.5 to packages maintained by 2 co-maintainers, ..., 0.1 to packages maintained by 10 co-maintainers.<br>Of course, that's broken because team emails only count as 1 co-maintainer. But it's better than nothing. (or not?)"
-
-sth = dbh.prepare("create temporary table costs as select source, 1.0/count(distinct email) as cost from (
-select maintainer_email as email, source from sources
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main'
-union
-select email, source from uploaders 
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main') as foo
-group by source")
-sth.execute
-
-sth = dbh.prepare("select email, sum(cost) as total_cost from (
-select maintainer_email as email, source from sources
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main'
-union
-select email, source from uploaders 
-where release = 'sid'
-and distribution = 'debian'
-and component = 'main') as maintsrcs, costs
-where costs.source = maintsrcs.source
-group by email having sum(cost) >= 10 order by total_cost desc limit 70")
-sth.execute
-puts "<table border='1'><tr><th>email</th><th>total <i>cost</i> of all (co-)maintained packages</th></tr>"
-sth.fetch_all.each do |r|
-puts "<tr><td>#{r[0]}</td><td>#{"%.2f"%(r[1])}</td></tr>"
-end
-puts "</table>"
-puts "</body></html>"
-sth.finish

Deleted: udd/web/cgi-bin/nmu_stats.cgi
===================================================================
--- udd/web/cgi-bin/nmu_stats.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/nmu_stats.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,41 +0,0 @@
-#!/usr/bin/ruby -w
-
-require 'dbi'
-require 'pp'
-
-puts "Content-type: text/html\n\n"
-
-dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-sth = dbh.prepare("select changed_by, count(*) cnt from
-upload_history uh, sources s
-where s.distribution='debian' and s.release='sid'
-and s.source = uh.source and s.version = uh.version
-and uh.nmu
-and uh.date > current_timestamp - interval '2 months'
-group by changed_by having count(*) >= 2 order by cnt desc")
-sth.execute ; rows = sth.fetch_all
-
-puts "<h1>People having done more than 2 NMUs over the last 2 months (only uploads still in the archive)</h1>"
-puts "<table>"
-rows.each do |r|
-puts "<tr><td>#{r[0].gsub('<','&lt;').gsub('>','&gt;')}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-
-sth = dbh.prepare("select changed_by, count(*) cnt from
-upload_history uh, sources s
-where s.distribution='debian' and s.release='sid'
-and s.source = uh.source and s.version = uh.version
-and uh.nmu
-group by changed_by order by cnt desc")
-sth.execute ; rows = sth.fetch_all
-
-puts "<h1>NMUs uploaded currently in the archive</h1>"
-puts "<table>"
-rows.each do |r|
-puts "<tr><td>#{r[0].gsub('<','&lt;').gsub('>','&gt;')}</td><td>#{r[1]}</td></tr>"
-end
-puts "</table>"
-
-sth.finish

Deleted: udd/web/cgi-bin/orphaned_packages.cgi
===================================================================
--- udd/web/cgi-bin/orphaned_packages.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/orphaned_packages.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,26 +0,0 @@
-#!/usr/bin/ruby -w
-require 'dbi'
-
-puts "Content-type: text/html\n\n"
-
-dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-
-puts "<html><body>"
-
-sth = dbh.prepare("select sources.source, insts, date(op.orphaned_time), op.type, op.bug
-from sources, popcon_src, orphaned_packages op, bugs b
-where sources.source = popcon_src.source
-and distribution = 'debian' and release = 'sid'
-and sources.source = op.source
-and b.id = op.bug
-and op.type in ('O', 'ITA')
-and insts < 500
-and date(op.orphaned_time) < '2008-07-24'
-and date(b.last_modified) < '2008-07-24'")
-sth.execute
-puts "<table>"
-sth.fetch_all.each do |r|
-  puts "<tr><td><a href=\"http://packages.qa.debian.org/#{r[0]}\">#{r[0]}</a></td><td>#{r[1]}</td><td>#{r[2]}</td><td><a href=\"http://bugs.debian.org/#{r[4]}\">#{r[3]}</a></td></tr>"
-end
-puts "</table>"
-sth.finish

Deleted: udd/web/cgi-bin/package_bug_count.cgi
===================================================================
--- udd/web/cgi-bin/package_bug_count.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/package_bug_count.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,28 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-	SELECT package, COUNT(id) AS nr FROM bugs
-	WHERE
-		NOT (affects_stable OR affects_testing OR affects_unstable)
-		AND NOT EXISTS (SELECT 1 FROM bugs_tags WHERE bugs_tags.id = bugs.id AND bugs_tags.tag = 'fixed')
-	GROUP BY package ORDER BY nr DESC
-EOF
-	);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-}
-

Deleted: udd/web/cgi-bin/package_rc_bug_count.cgi
===================================================================
--- udd/web/cgi-bin/package_rc_bug_count.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/package_rc_bug_count.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,41 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-SELECT b.package, COUNT(b.id)
-FROM bugs b
-WHERE 
-        b.severity >= 'serious'
-    AND 
-        b.affects_testing
-    AND(
-            NOT EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag IN ('sid', 'sarge', 'etch', 'lenny', 'experimental'))
-        OR
-                EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag = 'squeeze')
-    )
-    AND NOT EXISTS (SELECT tag FROM bugs_tags t WHERE b.id=t.id AND t.tag = 'squeeze-ignore')
-    AND(
-            EXISTS (SELECT package FROM packages p WHERE p.package = b.package AND p.distribution = 'debian' AND p.release = 'squeeze')
-        OR
-            EXISTS (SELECT source FROM sources s WHERE s.source = b.package AND s.distribution = 'debian' AND s.release = 'squeeze')
-    )
-GROUP BY b.package
-EOF
-	);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-}
-

Deleted: udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi
===================================================================
--- udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,28 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-SELECT DISTINCT pkgs.package, insts
-FROM packages_summary pkgs, popcon
-WHERE pkgs.release = 'sid' AND pkgs.package NOT IN
-(SELECT package FROM packages_summary WHERE release = 'squeeze')
-AND popcon.package = pkgs.package ORDER BY insts DESC;
-EOF
-	);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-}
-

Deleted: udd/web/cgi-bin/removal_candidates.cgi
===================================================================
--- udd/web/cgi-bin/removal_candidates.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/removal_candidates.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,36 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $s = <<EOF
-select sources.source, id, insts, arrival, last_modified, title
-from sources, bugs, popcon_src
-where sources.distribution = 'debian' and sources.release = 'squeeze'
-and bugs.source = sources.source
-and id in (select id from bugs_rt_affects_testing_and_unstable)
-and bugs.severity >= 'serious'
-and arrival < (NOW() - interval '14 DAYS')
-and sources.source = popcon_src.source
-and popcon_src.insts < 2000
-order by insts ASC
-EOF
-;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare($s);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-print "$s\n\n";
-while(my @row = $sth->fetchrow_array) {
-	$" = "\t";
-	print "@row.\n";
-}
-

Deleted: udd/web/cgi-bin/source_higher_version_ubuntu_than_debian.cgi
===================================================================
--- udd/web/cgi-bin/source_higher_version_ubuntu_than_debian.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/source_higher_version_ubuntu_than_debian.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,51 +0,0 @@
-#!/usr/bin/python                                 
-#
-# Author:    Sandro Tosi <morph at debian.org>
-# Date:	     2009-09-18
-# Copyright: Copyright (C) 2009 Sandro Tosi <morph at debian.org>
-# License:   Public Domain
-#
-# Extract from UDD the source packages both in Debian and Ubuntu with higher
-# version in Ubuntu than in Debian
-
-# module to access PostgreSQL databases
-import psycopg2
-
-# connect to UDD database
-conn = psycopg2.connect(database="udd", port=5441, host="localhost", user="guest")
-
-# prepare a cursor                     
-cur = conn.cursor()                    
-
-# this is the query we'll be making
-query = """                        
-select debian.source, debian.version, ubuntu.version
-  from (select source, max(version) as version from sources group by 1) debian,
-       (select source, max(version) as version from ubuntu_sources group by 1) ubuntu
- where debian.source = ubuntu.source
-   and debian.version < ubuntu.version
- order by 1"""
-
-# execute the query
-cur.execute(query)
-
-# retrieve the whole result set
-data = cur.fetchall()
-
-# close cursor and connection
-cur.close()
-conn.close()
-
-# print results
-
-# CGI Content-type
-print "Content-type: text/plain\n\n"
-
-# heading
-print "Source packages with a higher version in Ubuntu than in Debian\n"
-print "%30s %25s %25s" % ('Source Package Name', 'Debian Version', 'Ubuntu Version')
-print "-"*82
-
-# actual data
-for row in data:
-    print "%30s %25s %25s" % row

Deleted: udd/web/cgi-bin/source_in_ubuntu_but_not_in_debian.cgi
===================================================================
--- udd/web/cgi-bin/source_in_ubuntu_but_not_in_debian.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/source_in_ubuntu_but_not_in_debian.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,49 +0,0 @@
-#!/usr/bin/python                                 
-#
-# Author:    Sandro Tosi <morph at debian.org>
-# Date:	     2009-09-18
-# Copyright: Copyright (C) 2009 Sandro Tosi <morph at debian.org>
-# License:   Public Domain
-#
-# Extract from UDD the source packages in Ubuntu but not in Debian
-
-# module to access PostgreSQL databases
-import psycopg2
-
-# connect to UDD database
-conn = psycopg2.connect(database="udd", port=5441, host="localhost", user="guest")
-
-# prepare a cursor                     
-cur = conn.cursor()                    
-
-# this is the query we'll be making
-query = """                        
-select source, max(version)
-  from ubuntu_sources
- where source not in (select distinct source from sources)
- group by source
- order by 1"""
-
-# execute the query
-cur.execute(query)
-
-# retrieve the whole result set
-data = cur.fetchall()
-
-# close cursor and connection
-cur.close()
-conn.close()
-
-# print results
-
-# CGI Content-type
-print "Content-type: text/plain\n\n"
-
-# heading
-print "Source packages in Ubuntu but not in Debian\n"
-print "%35s %25s" % ('Source Package Name', 'Ubuntu Version')
-print "-"*61
-
-# actual data
-for row in data:
-    print "%35s %25s" % row

Deleted: udd/web/cgi-bin/sources_in_etch_but_not_in_lenny.cgi
===================================================================
--- udd/web/cgi-bin/sources_in_etch_but_not_in_lenny.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/sources_in_etch_but_not_in_lenny.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-	select insts, sources.source
-	from sources, popcon_src
-	where release='etch'
-	and sources.source not in
-	   (select source from sources where release='lenny')
-	   and sources.source = popcon_src.source
-	   order by insts desc;
-EOF
-);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-}
-

Deleted: udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
===================================================================
--- udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,38 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-	SELECT DISTINCT ubu.source, insts
-        FROM (SELECT DISTINCT source FROM ubuntu_sources
-                WHERE release = 'karmic')
-          AS ubu,
-             ubuntu_popcon_src
-        WHERE NOT EXISTS (SELECT * FROM sources WHERE distribution = 'debian'
-                          and source = ubu.source)
-              AND ubuntu_popcon_src.source = ubu.source
-              AND ubu.source !~ '^language-(support|pack)-.*'
-              AND ubu.source !~ '^kde-l10n-.*'
-              AND ubu.source !~ 'ubuntu'
-              AND ubu.source !~ 'launchpad'
-         ORDER BY insts DESC;
-EOF
-	);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-my $n = 0;
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-	$n++;
-}
-print "\n\n# Packages: $n\n";
-

Deleted: udd/web/cgi-bin/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi
===================================================================
--- udd/web/cgi-bin/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/sources_in_unstable_but_not_in_testing_by_popcon_max.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,31 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-
-use DBI;
-use CGI;
-
-my $dbh = DBI->connect("dbi:Pg:dbname=udd;port=5441;host=localhost", "guest") or die $!;
-my $sth = $dbh->prepare(<<EOF
-SELECT DISTINCT unstable.source, insts
-FROM (SELECT DISTINCT source FROM sources
-WHERE distribution = 'debian' and release = 'sid')
-AS unstable,
-popcon_src
-WHERE unstable.source NOT IN (SELECT source FROM sources WHERE distribution = 'debian'
-AND release = 'squeeze')
-AND popcon_src.source = unstable.source ORDER BY insts DESC;
-EOF
-	);
-
-$sth->execute() or die $!;
-
-my $q = CGI->new();
-
-print $q->header(-type => 'text/plain');
-while(my @row = $sth->fetchrow_array) {
-	my ($package, $score) = @row;
-	print "$package\t$score\n";
-}
-

Deleted: udd/web/cgi-bin/ubuntu_stats.cgi
===================================================================
--- udd/web/cgi-bin/ubuntu_stats.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/ubuntu_stats.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,155 +0,0 @@
-#!/usr/bin/ruby -w
-
-require 'dbi'
-require 'pp'
-RELEASE='jaunty'
-
-puts "Content-type: text/plain\n\n"
-
-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'")
-sth.execute ; rows = sth.fetch_all
-allpkgs = rows[0][0]
-puts "Source packages in Debian: #{allpkgs}"
-
-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")
-sth.execute ; rows = sth.fetch_all
-pp rows
-
-puts "Not Ubuntu specific, not in debian:"
-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'))
- group by component")
-sth.execute ; rows = sth.fetch_all
-pp rows
-
-puts "Not Ubuntu specific, not in debian, version !~ /ubuntu/ (FAIL!):"
-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'
- group by component")
-sth.execute ; rows = sth.fetch_all
-pp rows
-
-puts "Also in Debian:"
-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'))
- group by component")
-sth.execute ; rows = sth.fetch_all
-pp rows
-
-puts "Also in Debian, not diverged (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
-
-
-puts "Also in Debian, diverged (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
-
-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'
-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' order by source")
-sth.execute ; rows = sth.fetch_all
-rows.each do |r|
-  print  r[0] + ' '
-end
-puts
-puts
-
-puts "diverged+new upstream (universe):"
-sth = dbh.prepare("select source from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' and component = 'universe'
-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' order by source")
-sth.execute ; rows = sth.fetch_all
-rows.each do |r|
-  print  r[0] + ' '
-end
-puts
-
-puts "diverged+new upstream, newer than in squeeze (main):"
-sth = dbh.prepare("select u.source, u.version, d.version from ubuntu_sources u, sources d
-where u.distribution = 'ubuntu' and u.release = '#{RELEASE}' and u.component = 'main'
-and d.distribution = 'debian' and d.release = 'squeeze'
-AND u.source !~ '^language-(support|pack)-.*' AND u.source !~ '^kde-l10n-.*' AND u.source !~ 'ubuntu' AND u.source !~ 'launchpad'
-AND u.source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
-AND u.version ~ '-0ubuntu'
-AND u.source = d.source
-AND u.version > d.version
-order by source")
-sth.execute ; rows = sth.fetch_all
-rows.each do |r|
-  print  r[0] + ' '
-end
-puts
-puts
-
-puts "diverged+new upstream, newer than in squeeze (universe):"
-sth = dbh.prepare("select u.source, u.version, d.version from ubuntu_sources u, sources d
-where u.distribution = 'ubuntu' and u.release = '#{RELEASE}' and u.component = 'universe'
-and d.distribution = 'debian' and d.release = 'squeeze'
-AND u.source !~ '^language-(support|pack)-.*' AND u.source !~ '^kde-l10n-.*' AND u.source !~ 'ubuntu' AND u.source !~ 'launchpad'
-AND u.source in (select source from sources where distribution='debian' and release in ('sid', 'lenny'))
-AND u.version ~ '-0ubuntu'
-AND u.source = d.source
-AND u.version > d.version
-order by source")
-sth.execute ; rows = sth.fetch_all
-rows.each do |r|
-  print  r[0] + ' '
-end
-puts
-puts
-
-
-
-
-sth.finish

Deleted: udd/web/cgi-bin/ubuntu_wrong_version.cgi
===================================================================
--- udd/web/cgi-bin/ubuntu_wrong_version.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/ubuntu_wrong_version.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,16 +0,0 @@
-#!/usr/bin/ruby -w
-
-require 'dbi'
-require 'pp'
-RELEASE='karmic'
-
-puts "Content-type: text/plain\n\n"
-
-dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-s = "select source, version, component from ubuntu_sources where distribution = 'ubuntu' and release = '#{RELEASE}' AND source not in (select source from sources where distribution='debian' and release in ('sid', 'squeeze', 'lenny')) AND version !~ 'ubuntu' and version ~ '-' order by component, source"
-sth = dbh.prepare(s)
-sth.execute ; rows = sth.fetch_all
-puts "# #{s}"
-rows.each do |r|
-  puts "#{r.join(' ')}"
-end

Modified: udd/web/cgi-bin/ubuntubugs.cgi
===================================================================
--- udd/web/cgi-bin/ubuntubugs.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/ubuntubugs.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,4 +1,5 @@
 #!/usr/bin/ruby -w
+# Used by DDPO
 
 require 'dbi'
 

Modified: udd/web/cgi-bin/ubuntupackages.cgi
===================================================================
--- udd/web/cgi-bin/ubuntupackages.cgi	2009-09-24 15:49:59 UTC (rev 1589)
+++ udd/web/cgi-bin/ubuntupackages.cgi	2009-09-24 16:01:57 UTC (rev 1590)
@@ -1,4 +1,5 @@
 #!/usr/bin/ruby -w
+# Used by DDPO
 
 require 'dbi'
 




More information about the Collab-qa-commits mailing list