From 868cca02c01bb9d952511009b97b1d809d3494a2 Mon Sep 17 00:00:00 2001 From: ajt <> Date: Tue, 20 Feb 2001 09:45:50 -0800 Subject: [PATCH] [project @ 2001-02-20 09:45:50 by ajt] fix up by-*.idx optimisation a bit --- cgi/common.pl | 8 ++++++-- cgi/pkgreport.cgi | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cgi/common.pl b/cgi/common.pl index eb837e59..c91f6bfa 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl -w +use DB_File; +use Fcntl qw/O_RDONLY/; + my $common_archive = 0; my $common_repeatmerged = 1; my %common_include = (); @@ -33,7 +36,7 @@ sub readparse { $val=~s/%(..)/pack("c",hex($1))/ge; $ret{$key}=$val; } -$debug = 1 if ($ret{"debug"} eq "aj"); +$debug = 1 if (defined $ret{"debug"} && $ret{"debug"} eq "aj"); return %ret; } @@ -299,7 +302,8 @@ sub getbugs { if (!$common_archive && defined $opt && -e "$debbugs::gSpoolDir/by-$opt.idx") { - tie my %lookup, DB_File => "$debbugs::gSpoolDir/by-$opt.idx", O_RDONLY + my %lookup; + tie %lookup, DB_File => "$debbugs::gSpoolDir/by-$opt.idx", O_RDONLY or die "$0: can't open $debbugs::gSpoolDir/by-$opt.idx ($!)\n"; while ($key = shift) { my $bugs = $lookup{$key}; diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index ddf6f01a..b68d440b 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -80,7 +80,7 @@ if (defined $pkg) { ($se = $d{"submitter"} || "") =~ s/\s*\(.*\)\s*//; $se = $1 if ($se =~ m/<(.*)>/); return $se eq $submitter; - }, 'submitter', $submitter); + }, 'submitter-email', $submitter); } elsif (defined $severity) { $tag = "$status $severity bugs"; @bugs = getbugs(sub {my %d=@_; -- 2.39.5