]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/CGI/Pkgreport.pm
allow specifying the dist in source_to_binary (for DB actions)
[debbugs.git] / Debbugs / CGI / Pkgreport.pm
index 01e661f30d987fff3cee189cab1803e6c1a4607d..4adb3628b1650deffad16b62c5090380a64c7d89 100644 (file)
@@ -119,7 +119,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;