[Collab-qa-commits] r538 - bapase

lucas at alioth.debian.org lucas at alioth.debian.org
Mon Dec 3 21:47:20 UTC 2007


Author: lucas
Date: 2007-12-03 21:47:20 +0000 (Mon, 03 Dec 2007)
New Revision: 538

Added:
   bapase/datafiles.rb
   bapase/html.rb
Modified:
   bapase/Makefile
   bapase/README
   bapase/gen_html.rb
   bapase/package-actions.txt
Log:
Lots of BAPASE improvements.

- datafiles.rb and html.rb split off gen_html.rb
- tags are semi-documented in README
- OK() renamed to WAIT(). new semantic for OK.
- now generates scores_orphaned.html, with O packages, and a different metric.
  also added column for O bug age.


Modified: bapase/Makefile
===================================================================
--- bapase/Makefile	2007-12-03 21:27:38 UTC (rev 537)
+++ bapase/Makefile	2007-12-03 21:47:20 UTC (rev 538)
@@ -1,8 +1,11 @@
-all: scores.html
+all: scores.html scores_orphaned.html
 	
-scores.html: Sources_ok testing-status.txt popcon_sources.txt package-actions.txt bugsummary wnppsummary
-	./gen_html.rb > $@
+scores.html: Sources_ok testing-status.txt popcon_sources.txt package-actions.txt bugsummary wnppsummary orphaned_packages.txt
+	./gen_html.rb
 
+scores_orphaned.html: Sources_ok testing-status.txt popcon_sources.txt package-actions.txt bugsummary wnppsummary orphaned_packages.txt
+	./gen_html.rb
+
 Sources_ok: testing-main-Sources testing-contrib-Sources testing-non-free-Sources unstable-main-Sources unstable-contrib-Sources unstable-non-free-Sources stable-main-Sources stable-contrib-Sources stable-non-free-Sources oldstable-main-Sources oldstable-contrib-Sources oldstable-non-free-Sources experimental-main-Sources experimental-contrib-Sources experimental-non-free-Sources
 	touch Sources_ok
 
@@ -72,7 +75,10 @@
 wnppsummary: bts2ldap-fullindex
 	./wnppsummary.rb > wnppsummary
 
+orphaned_packages.txt:
+	wget -O orphaned_packages.txt http://qa.debian.org/~lucas/orphaned-packages.txt
+
 clean:
-	rm -f testing-status.txt *-Sources popcon_sources.txt scores.txt Sources_ok bts2ldap-fullindex RC+patch.txt bugsummary wnppsummary
+	rm -f testing-status.txt *-Sources popcon_sources.txt scores.txt Sources_ok bts2ldap-fullindex RC+patch.txt bugsummary wnppsummary orphaned_packages.txt scores.html scores_orphaned.html
 
 .PHONY: clean

Modified: bapase/README
===================================================================
--- bapase/README	2007-12-03 21:27:38 UTC (rev 537)
+++ bapase/README	2007-12-03 21:47:20 UTC (rev 538)
@@ -2,3 +2,13 @@
 -----------------------------
 This directory contains a set of scripts which use various metrics to determine
 packages that require some actions (removal, orphaning, maintainer ping, etc)
+
+Actions:
+--------
+PROP_RM - TODO
+PROP_RM_O - TODO
+PROP_O - TODO
+RM_REQ - TODO
+O - TODO
+WAIT - Package evolved somehow, so we postpone action for ARGUMENT days.
+OK - Package returned to a normal state, and needs no further action currently.

Added: bapase/datafiles.rb
===================================================================
--- bapase/datafiles.rb	                        (rev 0)
+++ bapase/datafiles.rb	2007-12-03 21:47:20 UTC (rev 538)
@@ -0,0 +1,215 @@
+# read *-Sources and return hashes for bin->src and src->bin resolutions
+def read_sources
+  srcpkg = {}
+  pkgs = {}
+  Dir::glob('{testing,unstable}-*-Sources') do |s|
+    src = nil
+    IO::read(s).each_line do |l|
+      if l =~ /^Package:/
+        src = l.split(' ')[1].chomp
+        pkgs[src] = [] if pkgs[src].nil?
+      elsif l =~ /^Binary:/
+        l.split(' ',2)[1].split(', ').each do |b|
+          b.chomp!
+          if srcpkg[b].nil? # else, we already know that binary pkg
+            srcpkg[b] = src
+            pkgs[src] << b
+          end
+        end
+      end
+    end
+  end
+  return [srcpkg, pkgs]
+end
+
+class TestingStatus
+  attr_accessor :testingversion, :unstableversion, :firstinunstable, :testingdays, :intesting, :syncdays, :sync, :syncversion
+end
+
+# read testing-status.txt and return an hash of TestingStatus objects
+def read_testing
+  testing = {}
+  IO::read('testing-status.txt').each_line do |l|
+    ts = TestingStatus::new
+    p, ts.testingversion, ts.unstableversion, ts.firstinunstable, ts.testingdays, ts.intesting, ts.syncdays, ts.sync, ts.syncversion = l.chomp.split(' ')
+    ts.firstinunstable = Date::parse(ts.firstinunstable)
+    ts.intesting = Date::parse(ts.intesting)
+    ts.sync = Date::parse(ts.sync)
+    ts.syncdays = ts.syncdays.to_i
+    ts.testingdays = ts.testingdays.to_i
+    testing[p] = ts
+  end
+  testing
+end
+
+class Actions
+  attr_reader :actions, :act_todo, :act_status, :act_comment
+  def initialize
+    @actions = []
+    @act_status = ""
+    @act_todo = false
+    @act_comment = ""
+  end
+
+  def add(desc)
+    desc.chomp!
+    date, who, act, comment = desc.split(' ', 4)
+    date = Date::parse(date)
+    if act =~ /^(.+)\((.+)\)$/
+      act_name, act_arg = $1, $2
+      if [ 'PROP_RM', 'PROP_RM_O', 'PROP_O', 'O', 'REQ_RM', 'SEC_RM' ].include?(act_name)
+        # FIXME check bug
+      elsif act_name == 'WAIT'
+        act_arg = act_arg.to_i
+      else
+        puts "Unknown action: #{act} (#{desc})"
+      end
+      @actions << [date, who, [act_name, act_arg], comment]
+    elsif act == 'OK'
+      act_arg = nil
+      @actions << [date, who, [act_name, act_arg], comment]
+    else
+      puts "Unparseable action: #{act} (#{desc})"
+      exit(1)
+    end
+  end
+ 
+  def analyze_actions
+    @actions.sort! { |a,b| b[0] <=> a[0] }
+    idx = 0
+    rm_o = false
+    while idx < @actions.length
+      if @actions[idx][2][0] == 'OK'
+          @act_status = "OK"
+          @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+      elsif @actions[idx][2][0] == 'WAIT'
+        if @actions[idx][0] + @actions[idx][2][1] <= CURDATE
+          idx += 1
+          next # OK not valid anymore, consider next action
+        else
+          # nothing to do except waiting
+          @act_status = "Waiting until #{@actions[idx][0] + @actions[idx][2][1]}"
+          @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+          break
+        end
+      elsif @actions[idx][2][0] == 'REQ_RM'
+        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal was requested</a>"
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        break
+      elsif @actions[idx][2][0] == 'O'
+        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Was orphaned</a>"
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        break
+      elsif @actions[idx][2][0] == 'SEC_RM'
+        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal request needed by !#{@actions[idx][1]}</a>"
+        @act_todo = true
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        break
+      elsif @actions[idx][2][0] == 'PROP_RM_O'
+        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Was orphaned, will need removal</a>"
+        rm_o = true
+        idx += 1
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        next
+      elsif @actions[idx][2][0] == 'PROP_RM'
+        ok = false
+        if @actions[idx][0] + 50 <= CURDATE and !rm_o
+          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be orphaned before removal (since #{@actions[idx][0] + 50})</a>"
+          @act_todo = true
+          ok = true
+        end
+        if @actions[idx][0] + 100 <= CURDATE
+          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be removed (since #{@actions[idx][0] + 100})</a>"
+          @act_todo = true
+          ok = true
+        end
+        if !ok
+          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal suggested (since #{@actions[idx][0]})</a>"
+        end
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        break
+      elsif @actions[idx][2][0] == 'PROP_O'
+        if @actions[idx][0] + 50 <= CURDATE
+          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be orphaned (since #{@actions[idx][0] + 50})</a>"
+          @act_todo = true
+        else
+          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Orphaning suggested (since #{@actions[idx][0]})</a>"
+        end
+        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
+        break
+      else
+        puts "Unknown act: #{@actions[idx][2][0]}"
+        exit(1)
+      end
+    end
+  end
+
+  def Actions::read(file)
+    pkgs = {}
+    IO::read(file).each_line do |l|
+      next if l =~/^\s*#/ or l =~/^\s*$/
+      pkg, rest = l.split(' ',2)
+      if pkgs[pkg].nil?
+        pkgs[pkg] = Actions::new
+      end
+      pkgs[pkg].add(rest)
+    end
+    pkgs.each_pair { |k, v| v.analyze_actions }
+    pkgs
+  end
+end
+
+# Read popcon_sources.txt
+def read_popcon
+  popcon = Hash::new { 0 }
+  IO::read('popcon_sources.txt').each_line do |l|
+    pkg, v = l.split
+    popcon[pkg] = v.to_i
+  end
+  popcon
+end
+
+def read_bugs
+  rcbugs = Hash::new { 0 }
+  bugs = Hash::new { 0 }
+  IO::read('bugsummary').each_line do |l|
+    f = l.split(' ')
+    rcbugs[f[0]] = f[2].to_i
+    bugs[f[0]] = f[8].to_i
+  end
+  [ rcbugs, bugs ]
+end
+
+def read_wnpp
+  wnpp = {}
+  IO::read('wnppsummary').each_line do |l|
+    p, t, n = l.split(' ')
+    if wnpp[p].nil?
+      wnpp[p] = []
+    end
+    wnpp[p] << [ t, n ]
+  end
+  wnpp
+end
+
+class OrphanedPackage
+  attr_accessor :state, :bug, :date, :severity
+
+  def initialize
+    @state, @bug, @date, @severity = nil
+  end
+
+  def OrphanedPackage::readfile
+    ops = {}
+    IO::read('orphaned_packages.txt').each_line do |l|
+      p, st, b, d, sev = l.split(' ')
+      op = OrphanedPackage::new
+      op.state = st
+      op.bug = b
+      op.date = Time::at(d.to_i)
+      op.severity = sev
+      ops[p] = op
+    end
+    ops
+  end
+end

Modified: bapase/gen_html.rb
===================================================================
--- bapase/gen_html.rb	2007-12-03 21:27:38 UTC (rev 537)
+++ bapase/gen_html.rb	2007-12-03 21:47:20 UTC (rev 538)
@@ -1,211 +1,21 @@
 #!/usr/bin/ruby -w
 
 require 'date'
+require 'datafiles'
+require 'html'
 
 DATEZERO = Date::parse('0000-01-01')
 CURDATE = Date::today
 
-# hash for bin->src resolution
-$srcpkg = {}
-
-# hash for src->bins resolution
-$pkgs = {}
-
-# hash for testing status
-$testing = {}
-
-# read *-Sources and feed $srcpkg and $pkgs
-def read_sources
-  Dir::glob('{testing,unstable}-*-Sources') do |s|
-    src = nil
-    IO::read(s).each_line do |l|
-      if l =~ /^Package:/
-        src = l.split(' ')[1].chomp
-        $pkgs[src] = [] if $pkgs[src].nil?
-      elsif l =~ /^Binary:/
-        l.split(' ',2)[1].split(', ').each do |b|
-        b.chomp!
-        if $srcpkg[b].nil? # else, we already know that binary pkg
-          $srcpkg[b] = src
-          $pkgs[src] << b
-        end
-        end
-      end
-    end
-  end
-end
-
-class TestingStatus
-  attr_accessor :testingversion, :unstableversion, :firstinunstable, :testingdays, :intesting, :syncdays, :sync, :syncversion
-end
-
-# read testing-status.txt and feed $testing
-def read_testing
-  IO::read('testing-status.txt').each_line do |l|
-    ts = TestingStatus::new
-    p, ts.testingversion, ts.unstableversion, ts.firstinunstable, ts.testingdays, ts.intesting, ts.syncdays, ts.sync, ts.syncversion = l.chomp.split(' ')
-    ts.firstinunstable = Date::parse(ts.firstinunstable)
-    ts.intesting = Date::parse(ts.intesting)
-    ts.sync = Date::parse(ts.sync)
-    ts.syncdays = ts.syncdays.to_i
-    ts.testingdays = ts.testingdays.to_i
-    $testing[p] = ts
-  end
-end
-
-class Actions
-  attr_reader :actions, :act_todo, :act_status, :act_comment
-  def initialize
-    @actions = []
-    @act_status = ""
-    @act_todo = false
-    @act_comment = ""
-  end
-
-  def add(desc)
-    desc.chomp!
-    date, who, act, comment = desc.split(' ', 4)
-    date = Date::parse(date)
-    if act =~ /^(.+)\((.+)\)$/
-      act_name, act_arg = $1, $2
-      if [ 'PROP_RM', 'PROP_RM_O', 'PROP_O', 'O', 'REQ_RM', 'SEC_RM' ].include?(act_name)
-        # FIXME check bug
-      elsif act_name == 'OK'
-        act_arg = act_arg.to_i
-      else
-        puts "Unknown action: #{act} (#{desc})"
-      end
-      @actions << [date, who, [act_name, act_arg], comment]
-    else
-      puts "Unparseable action: #{act} (#{desc})"
-      exit(1)
-    end
-  end
- 
-  def analyze_actions
-    @actions.sort! { |a,b| b[0] <=> a[0] }
-    idx = 0
-    rm_o = false
-    while idx < @actions.length
-      if @actions[idx][2][0] == 'OK'
-        if @actions[idx][0] + @actions[idx][2][1] <= CURDATE
-          idx += 1
-          next # OK not valid anymore, consider next action
-        else
-          # nothing to do except waiting
-          @act_status = "OKed (until #{@actions[idx][0] + @actions[idx][2][1]})"
-          @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-          break
-        end
-      elsif @actions[idx][2][0] == 'REQ_RM'
-        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal was requested</a>"
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        break
-      elsif @actions[idx][2][0] == 'O'
-        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Was orphaned</a>"
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        break
-      elsif @actions[idx][2][0] == 'SEC_RM'
-        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal request needed by !#{@actions[idx][1]}</a>"
-        @act_todo = true
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        break
-      elsif @actions[idx][2][0] == 'PROP_RM_O'
-        @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Was orphaned, will need removal</a>"
-        rm_o = true
-        idx += 1
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        next
-      elsif @actions[idx][2][0] == 'PROP_RM'
-        ok = false
-        if @actions[idx][0] + 50 <= CURDATE and !rm_o
-          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be orphaned before removal (since #{@actions[idx][0] + 50})</a>"
-          @act_todo = true
-          ok = true
-        end
-        if @actions[idx][0] + 100 <= CURDATE
-          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be removed (since #{@actions[idx][0] + 100})</a>"
-          @act_todo = true
-          ok = true
-        end
-        if !ok
-          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Removal suggested (since #{@actions[idx][0]})</a>"
-        end
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        break
-      elsif @actions[idx][2][0] == 'PROP_O'
-        if @actions[idx][0] + 50 <= CURDATE
-          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Should be orphaned (since #{@actions[idx][0] + 50})</a>"
-          @act_todo = true
-        else
-          @act_status = "<a href=\"http://bugs.debian.org/#{@actions[idx][2][1]}\">Orphaning suggested (since #{@actions[idx][0]})</a>"
-        end
-        @act_comment = @actions[idx][3] if not @actions[idx][3].nil?
-        break
-      else
-        puts "Unknown act: #{@actions[idx][2][0]}"
-        exit(1)
-      end
-    end
-  end
-
-  def Actions::read(file)
-    pkgs = {}
-    IO::read(file).each_line do |l|
-      next if l =~/^\s*#/ or l =~/^\s*$/
-      pkg, rest = l.split(' ',2)
-      if pkgs[pkg].nil?
-        pkgs[pkg] = Actions::new
-      end
-      pkgs[pkg].add(rest)
-    end
-    pkgs.each_pair { |k, v| v.analyze_actions }
-    pkgs
-  end
-end
-
-# Popcon
-$popcon = Hash::new { 0 }
-def read_popcon
-  IO::read('popcon_sources.txt').each_line do |l|
-    pkg, v = l.split
-    $popcon[pkg] = v.to_i
-  end
-end
-
-# BUGS
-$rcbugs = Hash::new { 0 }
-$bugs = Hash::new { 0 }
-
-def read_bugs
-  IO::read('bugsummary').each_line do |l|
-    f = l.split(' ')
-    $rcbugs[f[0]] = f[2].to_i
-    $bugs[f[0]] = f[8].to_i
-  end
-end
-
-# WNPP
-$wnpp = Hash::new
-
-def read_wnpp
-  IO::read('wnppsummary').each_line do |l|
-    p, t, n = l.split(' ')
-    if $wnpp[p].nil?
-      $wnpp[p] = []
-    end
-    $wnpp[p] << [ t, n ]
-  end
-end
-
-# ACTIONS
+$testing = read_testing
+$srcpkg, $pkgs = read_sources
+$popcon = read_popcon
+$rcbugs, $bugs = read_bugs
+$wnpp = read_wnpp
 $actions = Actions::read('package-actions.txt')
-read_sources
-read_testing
-read_popcon
-read_bugs
-read_wnpp
+$orph = OrphanedPackage::readfile
 
+# Compute score for all packages
 $score = {}
 $pkgs.keys.each do |pkg|
   score = 0
@@ -248,71 +58,55 @@
   $score[pkg] = score if score > 0
 end
 
-puts "<html><head>
-<style type=\"text/css\">
-  td, th {
-    border: 1px solid gray;
-  }
-    tr:hover  {
-      background-color: #ccc;
-    }
-  table {
-    border-collapse: collapse;
-  }
-</style>
-<title>PP</title>
-</head><body>"
-puts "<table border=\"1\"><tr>"
-puts "<th></th><th>Package</th><th>Score</th><th>Action</th><th>Testing</th><th>Migrate</th><th>Popcon</th><th>WNPP</th><th>RC</th><th>Bugs</th><th>Comments</th>"
-puts "</tr>"
-
-n = 0
-$score.to_a.sort { |a,b| b[1] <=> a[1] }.each do |e|
-  pkg = e[0]
-  n += 1
-  break if n >= 1000
-  puts "<tr><td>#{n}</td>"
-  puts "<td><a href=\"http://packages.qa.debian.org/#{pkg}\">#{pkg}</a></td>"
-  puts "<td>#{$score[pkg]}</td>"
-  if $actions[pkg]
-    if $actions[pkg].act_todo
-      puts "<td><b>#{$actions[pkg].act_status}</b></td>"
-    else
-      puts "<td>#{$actions[pkg].act_status}</td>"
-    end
-  else
-    puts "<td></td>"
-  end
+# Compute score, orphaned packages only
+$oscore = {}
+$pkgs.keys.each do |pkg|
+  next if !$orph.has_key?(pkg)
+  score = 0
+  score += (Time::now - $orph[pkg].date) / 86400 * 10
   if $testing[pkg]
-    puts "<td>#{$testing[pkg].testingdays}</td><td>#{$testing[pkg].syncdays}</td>"
+    ts = $testing[pkg]
+    score += ts.testingdays
+    score += (ts.syncdays * 0.5) if ts.syncdays > 10
   else
-    puts "<td>?</td><td>?</td>"
+    score += 1000000
   end
-
-  puts "<td>#{$popcon[pkg]}</td>"
-
-  puts "<td>"
-  if $wnpp[pkg]
-    $wnpp[pkg].each do |e|
-      puts "<a href=\"http://bugs.debian.org/#{e[1]}\">#{e[0]}</a> "
+  if $actions[pkg] and $actions[pkg].act_todo
+    score += 100000 # bump score if action needed
+  end
+  if $popcon[pkg] < 500
+    score += (500 - $popcon[pkg]) * 2
+  end
+  if $rcbugs[pkg] > 0
+    if $rcbugs[pkg] > 4
+      score += 5 * 300
+    else
+      score += $rcbugs[pkg] * 300
     end
   end
-  puts "</td>"
-
-  puts "<td><a href=\"http://bugs.debian.org/src:#{pkg}\">#{$rcbugs[pkg]}</a></td>"
-  puts "<td><a href=\"http://bugs.debian.org/src:#{pkg}\">#{$bugs[pkg]}</a></td>"
-  # comments
-  if $actions[pkg]
-    comment = $actions[pkg].act_comment.gsub(/#\d+/) do |bug|
-      bugn = bug.gsub(/^#/, '')
-      "<a href=\"http://bugs.debian.org/#{bugn}\">#{bug}</a>"
+  # score bugs
+  if $bugs[pkg] > 0
+    pc = $popcon[pkg]
+    bugs = $bugs[pkg]
+    if pc < 4000
+      norm = 1 + 0.002 * pc
+    elsif pc < 60000
+      norm = 7.85 + (16.0/56000) * pc
+    else
+      norm = 25
     end
-    puts "<td>#{comment}</td>"
-  else
-    puts "<td></td>"
+    if bugs > norm
+      ret = (bugs - norm)/norm * 100 * 10 # 10% more -> 100 pts
+      score += (ret > 2000 ? 2000 : ret)
+    end
   end
-  puts "</tr>"
+  $oscore[pkg] = score if score > 0
 end
-puts "</table>"
-puts " -- #{$score.length} packages listed."
-puts "</body></html>"
+
+# Generate HTML files
+f = File::new('scores.html', 'w')
+gen_html($score, f)
+f.close
+f = File::new('scores_orphaned.html', 'w')
+gen_html($oscore, f, true)
+f.close

Added: bapase/html.rb
===================================================================
--- bapase/html.rb	                        (rev 0)
+++ bapase/html.rb	2007-12-03 21:47:20 UTC (rev 538)
@@ -0,0 +1,88 @@
+# generate HTML.
+# uses $actions, $score, etc...
+
+require 'time'
+
+def gen_html(score, io, orphaned = false)
+  io.puts <<-EOF
+<html><head>
+<style type="text/css">
+  td, th {
+    border: 1px solid gray;
+    padding-left: 2px;
+    padding-right: 2px;
+  }
+  th {
+    font-size: 8pt;
+  }
+  tr:hover  {
+    background-color: #ccc;
+  }
+  table {
+    border-collapse: collapse;
+  }
+</style>
+<title>BAPASE</title>
+</head><body>
+<table border="1"><tr>
+<th></th><th>Package</th><th>Score</th><th>Action</th>
+EOF
+io.puts "<th>O age</th>" if orphaned
+io.puts <<-EOF
+<th>Testing</th><th>Migrate</th><th>Popcon</th><th>Wnpp</th><th>RC</th><th>Bugs</th><th>Comments</th>
+</tr>
+EOF
+
+  n = 0
+  score.to_a.sort { |a,b| b[1] <=> a[1] }.each do |e|
+    pkg = e[0]
+    n += 1
+    break if n >= 1000
+    io.puts "<tr><td>#{n}</td>"
+    io.puts "<td><a href=\"http://packages.qa.debian.org/#{pkg}\">#{pkg}</a></td>"
+    io.puts "<td>#{score[pkg].round}</td>"
+    if $actions[pkg]
+      if $actions[pkg].act_todo
+        io.puts "<td><b>#{$actions[pkg].act_status}</b></td>"
+      else
+        io.puts "<td>#{$actions[pkg].act_status}</td>"
+      end
+    else
+      io.puts "<td></td>"
+    end
+    if orphaned
+      d = ((Time::now - $orph[pkg].date)/86400).to_i
+      da = $orph[pkg].date.xmlschema.split('T')[0]
+      io.puts "<td>#{d} (#{da})</td>"
+    end
+    if $testing[pkg]
+      io.puts "<td>#{$testing[pkg].testingdays}</td><td>#{$testing[pkg].syncdays}</td>"
+    else
+      io.puts "<td>?</td><td>?</td>"
+    end
+    io.puts "<td>#{$popcon[pkg]}</td>"
+    io.puts "<td>"
+    if $wnpp[pkg]
+      $wnpp[pkg].each do |e|
+        io.puts "<a href=\"http://bugs.debian.org/#{e[1]}\">#{e[0]}</a> "
+      end
+    end
+    io.puts "</td>"
+    io.puts "<td><a href=\"http://bugs.debian.org/src:#{pkg}\">#{$rcbugs[pkg]}</a></td>"
+    io.puts "<td><a href=\"http://bugs.debian.org/src:#{pkg}\">#{$bugs[pkg]}</a></td>"
+    # comments
+    if $actions[pkg]
+      comment = $actions[pkg].act_comment.gsub(/#\d+/) do |bug|
+        bugn = bug.gsub(/^#/, '')
+        "<a href=\"http://bugs.debian.org/#{bugn}\">#{bug}</a>"
+      end
+      io.puts "<td>#{comment}</td>"
+    else
+      io.puts "<td></td>"
+    end
+    io.puts "</tr>"
+  end
+  io.puts "</table>"
+  io.puts " -- #{score.length} packages listed."
+  io.puts "</body></html>"
+end

Modified: bapase/package-actions.txt
===================================================================
--- bapase/package-actions.txt	2007-12-03 21:27:38 UTC (rev 537)
+++ bapase/package-actions.txt	2007-12-03 21:47:20 UTC (rev 538)
@@ -3,29 +3,29 @@
 
 estraier 2007-05-10 lucas PROP_RM(423242)
 estraier 2007-10-13 lucas PROP_RM_O(446514)
-estraier 2007-10-14 lucas OK(20)
+estraier 2007-10-14 lucas WAIT(20)
 estraier 2007-11-05 lucas REQ_RM(423242)
 
 liblinux-aio-perl 2007-05-11 lucas PROP_RM(423327)
 liblinux-aio-perl 2007-10-13 lucas PROP_RM_O(423294)
-liblinux-aio-perl 2007-10-14 lucas OK(20)
+liblinux-aio-perl 2007-10-14 lucas WAIT(20)
 liblinux-aio-perl 2007-11-05 lucas REQ_RM(423327)
 
 php-image-canvas 2007-05-11 lucas PROP_RM(423353)
-php-image-canvas 2007-10-14 lucas OK(30)
-php-image-canvas 2007-11-29 lucas OK(15) pinged...
+php-image-canvas 2007-10-14 lucas WAIT(30)
+php-image-canvas 2007-11-29 lucas WAIT(15) pinged...
 
 php-image-graph 2007-05-11 lucas PROP_O(423310)
-php-image-graph 2007-10-14 lucas OK(30)
-php-image-graph 2007-11-29 lucas OK(15) pinged...
+php-image-graph 2007-10-14 lucas WAIT(30)
+php-image-graph 2007-11-29 lucas WAIT(15) pinged...
 
 gutenbrowser 2007-06-20 lucas PROP_RM(429795)
-gutenbrowser 2007-10-12 lucas OK(30)
-gutenbrowser 2007-11-29 lucas OK(15) maintainer responsive, but big issues.
+gutenbrowser 2007-10-12 lucas WAIT(30)
+gutenbrowser 2007-11-29 lucas WAIT(15) maintainer responsive, but big issues.
 
 pnetc 2007-05-11 abi PROP_RM(423354)
 pnetc 2007-10-13 lucas PROP_RM_O(423316)
-pnetc 2007-10-14 lucas OK(30)
+pnetc 2007-10-14 lucas WAIT(30)
 pnetc 2007-11-29 lucas REQ_RM(423354)
 
 ttyrec 2007-09-30 lucas PROP_RM(444704)
@@ -35,7 +35,7 @@
 phpqladmin 2007-11-29 lucas PROP_RM_O(444709)
 
 skippy 2007-09-30 lucas PROP_RM(444715)
-skippy 2007-11-29 lucas OK(15)
+skippy 2007-11-29 lucas WAIT(15)
 
 tinysnmp 2007-09-30 lucas PROP_RM(444723)
 tinysnmp 2007-11-29 lucas REQ_RM(444723)
@@ -44,51 +44,51 @@
 tmda 2007-11-29 lucas PROP_RM_O(444724)
 
 quake2 2007-05-10 lucas PROP_O(423200)
-quake2 2007-10-13 lucas OK(15)
-quake2 2007-11-05 lucas OK(20)
+quake2 2007-10-13 lucas WAIT(15)
+quake2 2007-11-05 lucas WAIT(20)
 quake2 2007-11-06 lucas O(423200)
 
 ppscsi 2007-05-11 lucas PROP_O(423317)
-ppscsi 2007-10-13 lucas OK(15)
+ppscsi 2007-10-13 lucas WAIT(15)
 ppscsi 2007-10-14 lucas PROP_RM(423317)
 
 swi-prolog 2007-05-11 lucas PROP_O(423322)
-swi-prolog 2007-10-13 lucas OK(30)
-swi-prolog 2007-11-29 lucas OK(15)
+swi-prolog 2007-10-13 lucas WAIT(30)
+swi-prolog 2007-11-29 lucas WAIT(15)
 
 parrot 2007-09-30 lucas PROP_O(444708)
-parrot 2007-11-29 lucas OK(15) pinged rafl on IRC
+parrot 2007-11-29 lucas WAIT(15) pinged rafl on IRC
 
 pugs 2007-09-30 lucas PROP_O(444711)
-pugs 2007-11-29 lucas OK(15) rafl pinged on IRC
+pugs 2007-11-29 lucas WAIT(15) rafl pinged on IRC
 
 prc-tools 2007-09-30 lucas PROP_O(444713)
 prc-tools 2007-11-29 lucas O(444713)
 
-crystalspace 2007-10-02 lucas OK(30)
-crystalspace-data 2007-10-02 lucas OK(30)
+crystalspace 2007-10-02 lucas WAIT(30)
+crystalspace-data 2007-10-02 lucas WAIT(30)
 
-zangband 2007-10-14 lucas OK(100)
+zangband 2007-10-14 lucas WAIT(100)
 
 gabber2 2007-10-10 lucas REQ_RM(444725)
 
 jabberoo 2007-10-10 lucas REQ_RM(444726)
 
-interchange 2007-10-14 lucas OK(50) see discussion in #340576
+interchange 2007-10-14 lucas WAIT(50) see discussion in #340576
 
-gcc-snapshot 2007-10-10 lucas OK(1000)
+gcc-snapshot 2007-10-10 lucas WAIT(1000)
 
-hurd 2007-10-10 lucas OK(1000)
+hurd 2007-10-10 lucas WAIT(1000)
 
-gnumach 2007-10-10 lucas OK(1000)
+gnumach 2007-10-10 lucas WAIT(1000)
 
-gtklookat 2007-10-14 lucas OK(20)
+gtklookat 2007-10-14 lucas WAIT(20)
 
-ghc-cvs 2007-10-10 lucas OK(1000)
+ghc-cvs 2007-10-10 lucas WAIT(1000)
 
-twutils 2007-10-10 lucas OK(20)
+twutils 2007-10-10 lucas WAIT(20)
 
-bayonne 2007-10-14 lucas OK(20) needs a sparc build, ok otherwise
+bayonne 2007-10-14 lucas WAIT(20) needs a sparc build, ok otherwise
 
 mercury 2007-10-14 lucas PROP_RM(446665)
 
@@ -96,9 +96,9 @@
 
 supercollider 2007-10-14 lucas PROP_RM(446667)
 
-jmagick 2007-10-14 lucas OK(100) has been orphaned but ITAed, so things might improve
+jmagick 2007-10-14 lucas WAIT(100) has been orphaned but ITAed, so things might improve
 
-vegastrike 2007-10-14 lucas OK(20) an upload should take place soon according to #426872
+vegastrike 2007-10-14 lucas WAIT(20) an upload should take place soon according to #426872
 
 arb 2007-10-14 lucas PROP_RM(446666)
 
@@ -108,14 +108,14 @@
 
 twin 2007-10-15 lucas PROP_O(446692)
 
-libgstreamer-perl 2007-10-15 lucas OK(30) Pinged HE in #422822
+libgstreamer-perl 2007-10-15 lucas WAIT(30) Pinged HE in #422822
 
 uclibc 2007-10-15 lucas PROP_O(446693)
 uclibc 2007-11-13 lucas REQ_RM(438738)
 
-crystalspace 2007-11-05 lucas OK(30) Pinged bayle in #358545
+crystalspace 2007-11-05 lucas WAIT(30) Pinged bayle in #358545
 
-basilisk2 2007-11-05 lucas OK(30) Pinged Jonas in #337887
+basilisk2 2007-11-05 lucas WAIT(30) Pinged Jonas in #337887
 
 gclcvs 2007-11-05 lucas PROP_RM(449352)
 
@@ -127,57 +127,57 @@
 
 libapache2-mod-xmlrpc2 2007-10-13 lucas O(423293)
 
-vegastrike 2007-11-05 lucas OK(30) Pinged debian-games team on IRC
+vegastrike 2007-11-05 lucas WAIT(30) Pinged debian-games team on IRC
 
 harbour 2007-10-13 lucas O(423287)
 
-pixie 2007-11-05 lucas OK(20)
+pixie 2007-11-05 lucas WAIT(20)
 
 oskit 2007-10-13 lucas O(423308)
 
 metalog 2007-10-13 lucas O(423299)
 
 dak 2007-11-05 lucas PROP_RM(449429)
-dak 2007-11-29 lucas OK(40)
+dak 2007-11-29 lucas WAIT(40)
 
 pgapack 2007-11-05 lucas PROP_RM(449431) pinged on #379388
 
-misdn-kernel 2007-11-05 lucas OK(20) new version in experimental...
+misdn-kernel 2007-11-05 lucas WAIT(20) new version in experimental...
 
-gnue-appserver 2007-11-05 lucas OK(20) maintained by ajmitch. let's wait for MIA.
+gnue-appserver 2007-11-05 lucas WAIT(20) maintained by ajmitch. let's wait for MIA.
 
 mobilemesh 2007-11-21 lucas PROP_RM(452102)
 
 cfengine2 2007-11-21 lucas PROP_O(452352)
 
-talksoup 2007-11-29 filippo OK(20) last maintainer upload was on 2007-11-14
+talksoup 2007-11-29 filippo WAIT(20) last maintainer upload was on 2007-11-14
 
-openvrml 2007-11-29 filippo OK(20) maint upload on 2007-09-29, one RC bug reported upstream 
+openvrml 2007-11-29 filippo WAIT(20) maint upload on 2007-09-29, one RC bug reported upstream 
 
 camelbones 2007-11-29 lucas PROP_RM(453430)
 
 jde 2007-11-29 filippo PROP_O(453477)
 
-doc-rfc 2007-11-29 filippo OK(20) pinged panthera on #357591 long standing bug though
+doc-rfc 2007-11-29 filippo WAIT(20) pinged panthera on #357591 long standing bug though
 
-pypy 2007-11-29 filippo OK(20) maint upload on 07-20 and NMU on 11-27, let's wait.. 
+pypy 2007-11-29 filippo WAIT(20) maint upload on 07-20 and NMU on 11-27, let's wait.. 
 
 lufs 2007-11-30 filippo PROP_RM(453741)
 
-schooltool 2007-11-30 filippo OK(100) new upstream version waiting, depending on zope beta
+schooltool 2007-11-30 filippo WAIT(100) new upstream version waiting, depending on zope beta
 
-haskell-cabal 2007-11-30 filippo OK(30) no answer from interested parties to #381817 pinging.. 
+haskell-cabal 2007-11-30 filippo WAIT(30) no answer from interested parties to #381817 pinging.. 
 
 adeos 2007-12-01 filippo PROP_RM(453806)
 
-bayonne 2007-12-01 filippo OK(200) maintainer seems active
+bayonne 2007-12-01 filippo WAIT(200) maintainer seems active
 
-nyello 2007-12-01 filippo OK(30) pinged rafl on IRC
+nyello 2007-12-01 filippo WAIT(30) pinged rafl on IRC
 nyello 2007-12-02 filippo PROP_RM(453936) as reported by rafl
 
 postman 2007-12-01 filippo PROP_O(453876)
 
-emile 2007-12-01 filippo OK(30) bugs are pending upload
+emile 2007-12-01 filippo WAIT(30) bugs are pending upload
 
 libapache-mod-auth-useragent 2007-12-02 filippo PROP_RM(429102) already done by alfie
 




More information about the Collab-qa-commits mailing list