]> git.donarmstrong.com Git - debbugs.git/commitdiff
use the bin_to_src cache in get_bug_statuses
authorDon Armstrong <don@donarmstrong.com>
Mon, 16 Apr 2018 23:30:58 +0000 (16:30 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 16 Apr 2018 23:30:58 +0000 (16:30 -0700)
Debbugs/Status.pm

index 38d645334affe889c31093a9ab326156ab7a844b..45b01a9a8781863a28f7548ad6fc0cfac403adef 100644 (file)
@@ -1321,6 +1321,10 @@ sub get_bug_statuses {
      my %param = validate_with(params => \@_,
                               spec   => $spec,
                              );
+     my $bin_to_src_cache = {};
+     if (defined $param{binary_to_source_cache}) {
+        $bin_to_src_cache = $param{binary_to_source_cache};
+     }
      my %status;
      my %statuses;
      if (defined $param{schema}) {
@@ -1391,8 +1395,9 @@ sub get_bug_statuses {
 
         $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}):(),
+                                             cache => $bin_to_src_cache,
+                                             defined $param{schema}?
+                                             (schema => $param{schema}):(),
                                             );
 
         $status->{"package"} = 'unknown' if ($status->{"package"} eq '');