]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/CGI/Pkgreport.pm
we don't necessarily need to deparse the email address for pkg links
[debbugs.git] / Debbugs / CGI / Pkgreport.pm
index cb53f17ea9da234c8b082649acb9e749d0619ddd..331073e54164a7b232c12f439e06e636a13aceea 100644 (file)
@@ -99,13 +99,14 @@ sub generate_package_info{
             binary_to_source(source_only => 1,
                              scalar_only => 1,
                              binary => $package,
-                             exists $param{schema}?(schema => $param{schema}):(),
+                             hash_slice(%param,qw(schema)),
                             );
      }
 
      my $showpkg = html_escape($package);
      my @maint = package_maintainer($param{binary}?'binary':'source',
-                                   $package
+                                   $package,
+                                   hash_slice(%param,qw(schema)),
                                   );
      if (@maint) {
          print {$output} '<p>';
@@ -119,7 +120,15 @@ sub generate_package_info{
               "This means that this package no longer exists (or never existed). ".
                   "Please do not report new bugs against this package. </p>\n";
      }
-     my @pkgs = getsrcpkgs($srcforpkg);
+     my @pkgs = source_to_binary(source => $srcforpkg,
+                                hash_slice(%param,qw(schema)),
+                                binary_only => 1,
+                                # if there are distributions, only bother to
+                                # show packages which are currently in a
+                                # distribution.
+                                @{$config{distributions}//[]} ?
+                                (dist => [@{$config{distributions}}]) : (),
+                               );
      @pkgs = grep( !/^\Q$package\E$/, @pkgs );
      if ( @pkgs ) {
          @pkgs = sort @pkgs;
@@ -357,8 +366,8 @@ sub pkg_htmlizebugs {
      my $binary_to_source_cache = {};
      my $statuses =
         get_bug_statuses(bug => \@bugs,
-                         (map {exists $param{$_}?($_,$param{$_}):()}
-                          qw(dist version schema bugusertags)
+                         hash_slice(%param,
+                          qw(dist version schema bugusertags),
                          ),
                          (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})),
                          binary_to_source_cache => $binary_to_source_cache,