From ea6642439e45dac39661990ae466929f105bfcb3 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 17 Sep 2008 20:13:16 -0700 Subject: [PATCH] fixup $status typo; $dist typo handle missing logs properly --- Debbugs/Common.pm | 2 -- Debbugs/Status.pm | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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); -- 2.39.2