[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.9-18-g2dc3666

Francesco Poli (wintermute) invernomuto at paranoici.org
Sat Jul 20 18:13:47 UTC 2013


The following commit has been merged in the master branch:
commit 7f9fa705f04665c04abeacbbeb5719515740f275
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Thu Jul 18 22:25:31 2013 +0200

    move version change info to tables in HTML display
    
    HTML bug lists previously included a final section where the version
    change for each involved package was separately summarized.
    This version change information has been moved to a dedicated column
    in the bug tables, so that it is readily visible in the row of each
    bug.

diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 817ca48..433ef3b 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -604,7 +604,7 @@ class Viewer
         if sub.size > 0
           o.puts "<table border=2 width=100%>"
           o.puts " <caption>" + @config.statmap(stat) + "</caption>"
-          o.puts " <tr><th>" + _("package") + "</th><th>" + _("severity") + "</th><th>" + _("bug number") + "</th><th>" + _("description") + "</th></tr>"
+          o.puts " <tr><th>" + _("package") + "</th><th>" + _("version change") + "</th><th>" + _("severity") + "</th><th>" + _("bug number") + "</th><th>" + _("description") + "</th></tr>"
           yield sub
           o.puts "</table><br>"
         end
@@ -615,7 +615,6 @@ class Viewer
       bug_exist_for_stat = 0
       bug_exist_for_pkg = 0
       bug_exist = 0
-      displayed_pkgs = []
 
       tmp = HtmlTempfile.new("apt-listbugs")
       tmp.puts "<html><head><title>" + _("Relevant bugs for your upgrade") + "</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=#{Locale.charset}\"></head><body>"
@@ -625,21 +624,14 @@ class Viewer
 
       each_state_table(tmp, bugs, @config.stats) { |bugs|
         bugs.each { |bug|
-          tmp.puts "<tr><td>#{bug.pkg_name}</td><td>#{bug.severity}</td><td><a href=\"http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=#{bug.bug_number}\">##{bug.bug_number}</a></td><td>#{bug.desc}</td></tr>"
-          displayed_pkgs << bug.pkg_name if !displayed_pkgs.include?(bug.pkg_name)
+          pkg = bug.pkg_name
+          tmp.puts "<tr><td>#{pkg}</td><td>"
+          tmp.puts "#{cur_pkgs[pkg]['version']} " if cur_pkgs[pkg] != nil
+          tmp.puts "-> #{new_pkgs[pkg]['version']}" if new_pkgs[pkg] != nil
+          tmp.puts "</td><td>#{bug.severity}</td><td><a href=\"http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=#{bug.bug_number}\">##{bug.bug_number}</a></td><td>#{bug.desc}</td></tr>"
         }
       }
 
-      tmp.puts "<h2>" + _("Package upgrade information in question") + "</h2>"
-      tmp.puts "<ul>"
-      displayed_pkgs.each { |pkg|
-        tmp.puts "<li>#{pkg}("
-        tmp.puts "#{cur_pkgs[pkg]['version']} " if cur_pkgs[pkg] != nil
-        tmp.puts "-> #{new_pkgs[pkg]['version']}" if new_pkgs[pkg] != nil
-        tmp.puts ")"
-      }
-      tmp.puts "</ul>"
-
       tmp.puts "</body></html>"
       tmp.close
 

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list