[DRE-commits] [SCM] Tracking the Debian/Ruby wheezy transition branch, master, updated. 6ac944e066bf38ad1103a6a9e76e23a68a2e8811

Lucas Nussbaum lucas at lucas-nussbaum.net
Thu Apr 7 07:34:04 UTC 2011


The following commit has been merged in the master branch:
commit 6ac944e066bf38ad1103a6a9e76e23a68a2e8811
Author: Lucas Nussbaum <lucas at lucas-nussbaum.net>
Date:   Thu Apr 7 08:50:47 2011 +0200

    also show count of source packages

diff --git a/details.html.erb b/details.html.erb
index f17116b..ca38e1a 100644
--- a/details.html.erb
+++ b/details.html.erb
@@ -11,6 +11,7 @@
     <a href='.'>Go back to overview page</a>
     </p>
     <h2>Packages using old policy (<span class='pending'>pending</span>): <%= pending_packages.count %></h2>
+    <h2>Source packages using old policy (<span class='pending'>pending</span>): <%= pending_source_packages.count %></h2>
     <table class='buglist'>
       <tr>
         <th>source</th>
diff --git a/retrieve.rb b/retrieve.rb
index 9845644..96cf421 100644
--- a/retrieve.rb
+++ b/retrieve.rb
@@ -38,6 +38,11 @@ EOF
 pending_packages = connection.exec(pending_packages_query)
 done_packages = connection.exec(done_packages_query)
 
+done_source_packages = done_packages.map { |pkg| pkg['source'] }.uniq
+pending_packages = pending_packages.to_a
+pending_packages.reject! { |pkg| done_source_packages.include?(pkg['source']) }
+pending_source_packages = pending_packages.map { |pkg| pkg['source'] }.uniq
+
 new_time_data = {
   'date' => Date.today.strftime('%Y%m%d').to_i,
   'pending' => pending_packages.count,

-- 
Tracking the Debian/Ruby wheezy transition



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