From 5b7af4a5807c9e3208edd56e872c97f083b42f68 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 14 Jun 2007 21:16:49 +0100 Subject: [PATCH] * Fix typo in Debbugs::Status * Allow guessing location from summary if passed * Don't show archived information for archived bugs --- Debbugs/Status.pm | 7 +++++-- cgi/pkgreport.cgi | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 312beaca..ae1d7a11 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -160,8 +160,10 @@ sub read_bug{ if not exists $param{bug} and not exists $param{summary}; my $status; my $log; + my $location; if (not defined $param{summary}) { - my ($lref, $location) = @param{qw(bug location)}; + my $lref; + ($lref,$location) = @param{qw(bug location)}; if (not defined $location) { $location = getbuglocation($lref,'summary'); return undef if not defined $location; @@ -174,6 +176,7 @@ sub read_bug{ $status = $param{summary}; $log = $status; $log =~ s/\.summary$/.log/; + ($location) = $status =~ m/(db-h|db|archive)/; } my $status_fh = new IO::File $status, 'r' or warn "Unable to open $status for reading: $!" and return undef; @@ -222,7 +225,7 @@ sub read_bug{ } # Add log last modified time $data{log_modified} = (stat($log))[9]; - $date{location} = $location; + $data{location} = $location; return \%data; } diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index cca0aaf6..5862dd19 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -644,7 +644,7 @@ sub pkg_htmlindexentrystatus { status => \%status, days_until => 1, ); - if ($days >= 0 and $status->{location} ne 'archive') { + if ($days >= 0 and defined $status->{location} and $status->{location} ne 'archive') { $result .= ";\nWill be archived" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . ""; } } @@ -920,7 +920,7 @@ sub pkg_htmlselectyesno { sub pkg_htmlselectsuite { my $id = sprintf "b_%d_%d_%d", $_[0], $_[1], $_[2]; my @suites = ("stable", "testing", "unstable", "experimental"); - my %suiteaka = ("stable", "sarge", "testing", "etch", "unstable", "sid"); + my %suiteaka = ("stable", "etch", "testing", "lenny", "unstable", "sid"); my $defaultsuite = "unstable"; my $result = sprintf '