- if (defined $maintainers{$pkg}) {
- print "<p>Maintainer for $pkg is <a href=\""
- . mainturl($maintainers{$pkg}) . "\">"
- . htmlsanit($maintainers{$pkg}) . "</a>.</p>\n";
+ my $maint = $pkg ? $maintainers{$pkg} : $maintainers{$src} ? $maintainers{$src} : undef;
+ if (defined $maint) {
+ print "<p>Maintainer for " . ( defined($pkg) ? $pkg : "source package $src" ) . " is <a href=\""
+ . mainturl($maint) . "\">"
+ . htmlsanit($maint) . "</a>.</p>\n";
+ }
+ my %pkgsrc = %{getpkgsrc()};
+ my @pkgs;
+ $src = $pkgsrc{ $pkg } if ( $pkg && !$src );
+ foreach ( keys %pkgsrc ) {
+ push @pkgs, $_ if $pkgsrc{$_} eq $src && ( ( $pkg && !( $_ eq $pkg ) ) || ( !$pkg && $src ) );
+ }
+ if ( @pkgs ) {
+ @pkgs = sort @pkgs;
+ if ($pkg) {
+ print "You may want to refer to the following packages that are part of the same source:<br>\n";
+ } else {
+ print "You may want to refer to the following packages' individual bug pages:<br>\n";
+ }
+ print join( ", ", map( "<A href=\"" . pkgurl($_) . "\">$_</A>", @pkgs ) );
+ print "\n";
+ }
+ if ($pkg) {
+ my $stupidperl = ${debbugs::gPackagePages};
+ printf "<p>You might like to refer to the <a href=\"%s\">%s package page</a>, or to the source package <a href=\"%s\">%s</a>'s bug page.</p>\n", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg"), urlsanit(srcurl($src)), $src;