From: Don Armstrong Date: Tue, 2 Jan 2018 19:26:59 +0000 (-0800) Subject: pass through a binary-to-source cache X-Git-Tag: release/2.6.0~32 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=6617fa4e20357b7c2bb9f5990984b08d4f827089 pass through a binary-to-source cache --- diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index e64300a..6f29e93 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -350,12 +350,14 @@ sub pkg_htmlizebugs { push @{$exclude{$key}}, split /\s*,\s*/, $value; } + my $binary_to_source_cache = {}; foreach my $bug (@bugs) { my %status = %{get_bug_status(bug=>$bug, (exists $param{dist}?(dist => $param{dist}):()), bugusertags => $param{bugusertags}, (exists $param{version}?(version => $param{version}):()), (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})), + binary_to_source_cache => $binary_to_source_cache, )}; next unless %status; next if bug_filter(bug => $bug, diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 4b8d82e..197b188 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -1220,6 +1220,9 @@ sub get_bug_status { indicatesource => {type => BOOLEAN, default => 1, }, + binary_to_source_cache => {type => HASHREF, + optional => 1, + }, }, ); my %status; @@ -1254,6 +1257,8 @@ sub get_bug_status { $status{source} = binary_to_source(binary=>[split /\s*,\s*/, $status{package}], source_only => 1, + exists $param{binary_to_source_cache}? + (cache =>$param{binary_to_source_cache}):(), ); $status{"package"} = 'unknown' if ($status{"package"} eq '');