[DRE-commits] [SCM] wheezy-transition-tracker.git branch, master, updated. f8c893cb5dc3bb7e07aa0c2e1d46a18b1617bf6e

Lucas Nussbaum lucas at wagner.debian.org
Wed Jun 15 05:48:38 UTC 2011


The following commit has been merged in the master branch:
commit f8c893cb5dc3bb7e07aa0c2e1d46a18b1617bf6e
Author: Lucas Nussbaum <lucas at wagner.debian.org>
Date:   Wed Jun 15 05:48:33 2011 +0000

    group by source package, sort by popcon, and number the lines

diff --git a/details.html.erb b/details.html.erb
index 9bd2437..1bea4c8 100644
--- a/details.html.erb
+++ b/details.html.erb
@@ -19,42 +19,46 @@
     <h3>Maintained by the PRE team</h3>
     <table class='buglist'>
       <tr>
+        <th></th>
         <th>source</th>
-        <th>package</th>
         <th>arch</th>
         <th>popcon</th>
         <th>maintainer</th>
         <th>uploaders</th>
+        <th>binaries</th>
       </tr>
-    <% pending_packages_team.each do |package| %>
+    <% n = 1; pending_packages_gr_team.each do |package| %>
       <tr>
+        <td><%= n %><% n += 1 %></th>
         <td><%= package['source'] %></th>
-        <td><%= package['binary'] %></th>
         <td><%= package['arch'] %></th>
-        <td><%= package['popcon'] %></th>
+        <td><%= package['popcon_src'] %></th>
         <td><%= package['maintainer'] %></th>
         <td><%= package['uploaders'] %></th>
+        <td><%= package['binaries'] %></th>
       </tr>
     <% end %>
     </table>
     <h3>Not maintained by the PRE team</h3>
     <table class='buglist'>
       <tr>
+        <th></th>
         <th>source</th>
-        <th>package</th>
         <th>arch</th>
         <th>popcon</th>
         <th>maintainer</th>
         <th>uploaders</th>
+        <th>binaries</th>
       </tr>
-    <% pending_packages_noteam.each do |package| %>
+    <% n = 1 ; pending_packages_gr_noteam.each do |package| %>
       <tr>
+        <td><%= n %><% n += 1 %></th>
         <td><%= package['source'] %></th>
-        <td><%= package['binary'] %></th>
         <td><%= package['arch'] %></th>
-        <td><%= package['popcon'] %></th>
+        <td><%= package['popcon_src'] %></th>
         <td><%= package['maintainer'] %></th>
         <td><%= package['uploaders'] %></th>
+        <td><%= package['binaries'] %></th>
       </tr>
     <% end %>
     </table>
diff --git a/retrieve.rb b/retrieve.rb
index 9fa9adb..6e1042d 100644
--- a/retrieve.rb
+++ b/retrieve.rb
@@ -20,9 +20,10 @@ end
 connection = PGconn.open(:host => 'localhost', :port => 5441, :user => 'guest', :dbname => 'udd')
 
 pending_packages_query = <<EOF
-select distinct s.source as source, p.package as binary, s.architecture as arch, coalesce(pc.insts, 0) as popcon, s.maintainer as maintainer, s.uploaders as uploaders
+select distinct s.source as source, p.package as binary, s.architecture as arch, coalesce(pc.insts, 0) as popcon, coalesce(pcs.insts, 0) as popcon_src, s.maintainer as maintainer, s.uploaders as uploaders
 from sources_uniq s, packages p
 left join popcon pc on (p.package = pc.package)
+left join popcon_src pcs on (p.source = pcs.source)
 where s.distribution = 'debian' and s.release='sid'
 and p.distribution = 'debian' and p.release='sid' and s.source = p.source
 and (s.source ~ 'lib.*-ruby' or p.package ~ 'lib.*-ruby.*' or s.build_depends ~ '.*ruby-pkg-tools.*' or s.build_depends_indep ~ '.*ruby-pkg-tools.*' or p.depends ~ '.*ruby1.8.*')
@@ -55,8 +56,18 @@ pending_packages.reject! { |pkg| done_binary_packages.include?(pkg['binary']) }
 pending_packages.reject! { |pkg| DONT_MIGRATE_SRC.include?(pkg['source']) }
 pending_source_packages = pending_packages.map { |pkg| pkg['source'] }.uniq
 
-pending_packages_team = pending_packages.select { |pkg| pkg['maintainer'] =~ /pkg-ruby-extras/ or pkg['uploaders'] =~ /pkg-ruby-extras/ }
-pending_packages_noteam = pending_packages.select { |pkg| not (pkg['maintainer'] =~ /pkg-ruby-extras/ or pkg['uploaders'] =~ /pkg-ruby-extras/) }
+pending_packages_gr = pending_packages.group_by { |pkg| { 'source' => pkg['source'], 'arch' => pkg['arch'], 'popcon_src' => pkg['popcon_src'], 'maintainer' => pkg['maintainer'], 'uploaders' => pkg['uploaders'] } }
+pending_packages_gr.each_pair do |k, v|
+  pending_packages_gr[k] = v.map { |pkg| "#{pkg['binary']} (#{pkg['popcon']})" }.join(', ')
+end
+pending_packages_gr = pending_packages_gr.to_a.map do |h, v|
+  h['binaries'] = v
+  h
+end
+pending_packages_gr.sort! { |a,b| a['popcon_src'].to_i <=> b['popcon_src'].to_i }
+pending_packages_gr.reverse!
+pending_packages_gr_team = pending_packages_gr.select { |pkg| pkg['maintainer'] =~ /pkg-ruby-extras/ or pkg['uploaders'] =~ /pkg-ruby-extras/ }
+pending_packages_gr_noteam = pending_packages_gr.select { |pkg| not (pkg['maintainer'] =~ /pkg-ruby-extras/ or pkg['uploaders'] =~ /pkg-ruby-extras/) }
 
 new_time_data = {
   'date' => Date.today.strftime('%Y%m%d').to_i,

-- 
wheezy-transition-tracker.git



More information about the Pkg-ruby-extras-commits mailing list