]> git.donarmstrong.com Git - debbugs.git/commitdiff
fixup $status typo; $dist typo
authorDon Armstrong <don@donarmstrong.com>
Thu, 18 Sep 2008 03:13:16 +0000 (20:13 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 18 Sep 2008 03:13:16 +0000 (20:13 -0700)
handle missing logs properly

Debbugs/Common.pm
Debbugs/Status.pm

index f1b6a144d8977c6cb234008bf7e2a373d51ddde1..a444a469d432a258556c8c9cf7436d406f94593a 100644 (file)
@@ -92,8 +92,6 @@ sub getbugcomponent {
        # getbuglocation() directly first.
        return undef if defined $location and
                        ($location ne 'db' and $location ne 'db-h');
-       # if there is no location, the bug doesn't exist
-       return undef if not defined $location;
     }
     my $dir = getlocationpath($location);
     return undef if not defined $dir;
index 69374eea2d6f725205f0012f8fd77e28439fc0bf..ac1346afa96d25ea291836a76d85ab2dfcc94d47 100644 (file)
@@ -183,6 +183,7 @@ sub read_bug{
         $status = getbugcomponent($lref, 'summary', $location);
         $log    = getbugcomponent($lref, 'log'    , $location);
         return undef unless defined $status;
+        return undef if not -e $status;
     }
     else {
         $status = $param{summary};
@@ -1074,7 +1075,7 @@ sub bug_presence {
                    (1) x @{$config{affects_distribution_tags}};
               my $some_distributions_disallowed = 0;
               my %allowed_distributions;
-              for my $tag (split ' ', ($status->{tags}||'')) {
+              for my $tag (split ' ', ($status{tags}||'')) {
                    if (exists $affects_distribution_tags{$tag}) {
                         $some_distributions_disallowed = 1;
                         $allowed_distributions{$tag} = 1;
@@ -1090,7 +1091,7 @@ sub bug_presence {
                              # distribution for the purposees of
                              # finding versions
                              if ($some_distributions_disallowed and
-                                 not exists $allowed_distributions{$tag}) {
+                                 not exists $allowed_distributions{$dist}) {
                                   next;
                              }
                              push @versions, getversions($package, $dist, $arch);