From: Don Armstrong Date: Thu, 18 Sep 2008 03:13:16 +0000 (-0700) Subject: fixup $status typo; $dist typo X-Git-Tag: release/2.6.0~472^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=ea6642439e45dac39661990ae466929f105bfcb3;p=debbugs.git fixup $status typo; $dist typo handle missing logs properly --- diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index f1b6a14..a444a46 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -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; diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 69374ee..ac1346a 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -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);