[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.5-21-gca683b2

Francesco Poli (wintermute) invernomuto at paranoici.org
Sat Dec 10 17:02:49 UTC 2011


The following commit has been merged in the master branch:
commit 5934754a1763ef456ebf4c3edc49ffe9a5094e4a
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Fri Dec 9 17:11:15 2011 +0100

    improved comments and debug output in am_i_buggy()

diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index c41855c..09879b2 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -866,8 +866,8 @@ module Factory
     end
 
     def am_i_buggy(ver, fixed, found)
-      # find out if this version is buggy or not depending on the fixed / found array.
-      # how do I handle casees of found / fixed = nil?
+      # find out if this version is buggy or not depending on the
+      # fixed / found arrays.
 
       puts " .. checking ver #{ver} against fixed:#{fixed} found:#{found}" if $DEBUG
 
@@ -885,40 +885,44 @@ module Factory
 
       val=true
 
-      # if ( found_max_below <= fixed_max_below ), I know it's fixed by ver.
-      # there are cases where found_max_below and fixed_max_below isn't available, ingnore it.
-
       if fixed_max_below == nil && found_max_below == nil
-        # this is a hard thing to handle, but do some guessing here:
-        # bug was not fixed or found before this version in consideration.
-        # It either means it wasn't found before this version, or 'found' version info is missing from BTS.
+        # this is a hard thing to handle, but do some guessing here...
+        # the bug was not fixed or found before this version:
+        # it either means it wasn't found before this version,
+        # or 'found' version info is missing from BTS
         if found_min_above == nil
-          # no new version found; which I guess signifies that the BTS is missing version info.
-          puts " ... found is nil; I guess I am buggy" if $DEBUG
+          # no new version found;
+          # which I guess means that the BTS is missing version info
+          puts " ... no found info: I guess I am buggy" if $DEBUG
           val=true
         else
-          # found_min_above is not nil, which means I may not be
-          # buggy; except for a case where it's fixed before the
-          # found_min, which probably means 'found' info is missing
-          # from BTS.
+          # found_min_above is not nil, which means I may not be buggy;
+          # except for a case where it's fixed before the found_min,
+          # which probably means 'found' info is missing from BTS
           if fixed_min_above == nil ||
               Debian::Dpkg.compare_versions(fixed_min_above, "gt", found_min_above)
-            puts " ... Bug is 'found' on a later version, I guess I am not buggy" if $DEBUG
+            puts " ... bug found in a later version: I guess I am not buggy" if $DEBUG
             val=false
           else
-            puts " ... Bug is 'fixed' on a later version before it's found again, I guess I am buggy" if $DEBUG
+            puts " ... bug fixed in a later version before it's found again: I guess I am buggy" if $DEBUG
             val=true
           end
         end
       else if fixed_max_below == nil
-             puts " ... found in prior version but not yet fixed" if $DEBUG
+             # the bug was found before (or in) this version, but fixed
+             # later (or never): it means I am buggy
+             puts " ... bug found in a prior version, but not yet fixed: I am buggy" if $DEBUG
              val=true
            else if found_max_below == nil || Debian::Dpkg.compare_versions(fixed_max_below, "gt", found_max_below)
-                  # this bugreport has recently been fixed
-                  puts " ... this bugreport is not found in this version or fixed_max_below > found_max_below: assuming that this bug does not apply for this version" if $DEBUG
+                  # the bug was not found between the latest fixed version
+                  # and this version: it means I am not buggy
+                  puts " ... bug not found between the latest fixed version and this version: I am not buggy" if $DEBUG
                   val=false
                 else
-                  # default path.
+                  # the bug was indeed found between the latest fixed version
+                  # and this version: it means I am buggy
+                  puts " ... bug found between the latest fixed version and this version: I am buggy" if $DEBUG
+                  val=true
                 end
            end
       end

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list