]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Versions.pm
[project @ 2005-07-17 16:06:26 by cjwatson]
[debbugs.git] / Debbugs / Versions.pm
index 3da63ce2be86824e63b915b1a4268011ee88f742..a5c697a2faa405fdfab02ae6f22d8cd9940d3943 100644 (file)
@@ -157,7 +157,13 @@ sub save ($*)
     for my $v (@vers) {
        delete $leaf{$parent->{$v}} if defined $parent->{$v};
     }
-    my @leaves = reverse sort { $self->{vercmp}->($a, $b) } keys %leaf;
+    # TODO: breaks with tcp-wrappers/1.0-1 tcpd/2.0-1 case
+    my @leaves = reverse sort {
+       my ($x, $y) = ($a, $b);
+       $x =~ s{.*/}{};
+       $y =~ s{.*/}{};
+       $self->{vercmp}->($x, $y);
+    } keys %leaf;
 
     my %seen;
     for my $lf (@leaves) {
@@ -207,6 +213,16 @@ sub buggy ($$$$)
        return 'fixed' if $fixed{$node};
     }
 
+    unless (@$found) {
+       # We don't know when it was found. Was it fixed in a descendant of
+       # this version? If so, this one should be considered buggy.
+       for my $f (@$fixed) {
+           for (my $node = $f; defined $node; $node = $parent->{$node}) {
+               return 'found' if $node eq $version;
+           }
+       }
+    }
+
     # Nothing in the requested version's ancestor chain can be confirmed as
     # a version in which the bug was found or fixed. If it was only found or
     # fixed on some other branch, then this one isn't buggy.