my $tail_html;
my %maintainer = %{getmaintainers()};
+my %pkgsrc = %{getpkgsrc()};
my $ref = $param{'bug'} || quit("No bug number");
my $msg = $param{'msg'} || "";
$indexentry .= ";\n<strong>Forwarded</strong> to ".htmlsanit($status{forwarded});
}
-my ($short, $tmaint);
+my ($short, $tmaint, $tsrc);
$short = $ref; $short =~ s/^\d+/#$&/;
$tmaint = defined($maintainer{$tpack}) ? $maintainer{$tpack} : '(unknown)';
+$tsrc = defined($pkgsrc{$tpack}) ? $pkgsrc{$tpack} : '(unknown)';
$descriptivehead= $indexentry.$submitted.";\nMaintainer for $status{package} is\n".
- '<A href="http://'.$debbugs::gWebDomain.'/db/ma/l'.&maintencoded($tmaint).'.html">'.htmlsanit($tmaint).'</A>.';
+ '<A href="http://'.$debbugs::gWebDomain.'/db/ma/l'.&maintencoded($tmaint).'.html">'.htmlsanit($tmaint).'</A>';
+$descriptivehead.= ";\n<br>Source for $status{package} is\n".
+ '<A href="'.srcurl($tsrc)."\">$tsrc</A>";
+$descriptivehead.= ".";
my $buglog = buglog($ref);
open L, "<$buglog" or &quit("open log for $ref: $!");
return urlsanit($debbugs::gCGIDomain . "pkgreport.cgi" . "?" . "$params");
}
+sub srcurl {
+ my $ref = shift;
+ my $params = "src=$ref";
+ $params .= "&archive=yes" if ($common_archive);
+ $params .= "&repeatmerged=yes" if ($common_repeatmerged);
+ return urlsanit($debbugs::gCGIDomain . "pkgreport.cgi" . "?" . "$params");
+}
+
sub urlsanit {
my $url = shift;
$url =~ s/%/%25/g;
return \%maintainer;
}
+sub getpkgsrc {
+ my %pkgsrc;
+
+ open(MM,"$gPackageSource") or &quit("open $gPackageSource: $!");
+ while(<MM>) {
+ next unless m/^(\S+)\s+(\S.*\S)\s*$/;
+ ($a,$b)=($1,$2);
+ $a =~ y/A-Z/a-z/;
+ $pkgsrc{$a}= $b;
+ }
+ close(MM);
+
+ return \%pkgsrc
+}
+
sub getbugdir {
my ( $bugnum, $ext ) = @_;
my $archdir = sprintf "%02d", $bugnum % 100;
my %param = readparse();
-my ($pkg, $maint, $maintenc, $submitter, $severity, $status);
+my ($pkg, $src, $maint, $maintenc, $submitter, $severity, $status);
if (defined ($pkg = $param{'pkg'})) {
+} elsif (defined ($src = $param{'src'})) {
} elsif (defined ($maint = $param{'maint'})) {
} elsif (defined ($maintenc = $param{'maintenc'})) {
} elsif (defined ($submitter= $param{'submitter'})) {
if (defined $pkg) {
$tag = "package $pkg";
@bugs = @{getbugs(sub {my %d=@_; return $pkg eq $d{"pkg"}}, 'package', $pkg)};
+} elsif (defined $src) {
+ $tag = "source $src";
+ my %pkgsrc = %{getpkgsrc()};
+ @bugs = @{getbugs(sub { my %d=@_; return $src eq $d{"pkg"} || ( defined( $pkgsrc{$d{"pkg"}} ) && $src eq $pkgsrc{$d{"pkg"}} ) }, 'source', $src) };
} elsif (defined $maint) {
my %maintainers = %{getmaintainers()};
$tag = "maintainer $maint";
print "<H1>" . "$debbugs::gProject$Archived $debbugs::gBug report logs: $tag" .
"</H1>\n";
-if (defined $pkg) {
+if (defined $pkg || defined $src) {
my %maintainers = %{getmaintainers()};
- 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;
}
- print "<p>Note that with multi-binary packages there may be other\n";
- print "reports filed under the different binary package names.</p>\n";
- print "\n";
-my $stupidperl = ${debbugs::gPackagePages};
- printf "<p>You might like to refer to the <a href=\"%s\">%s package page</a></p>\n", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg");
} elsif (defined $maint || defined $maintenc) {
print "<p>Note that maintainers may use different Maintainer fields for\n";
print "different packages, so there may be other reports filed under\n";
# This is the template debbugs configuration file.
# You *must* edit it in order for debbugs to work.
-# $Id: config.in,v 1.13 2001/04/24 19:10:26 doogie Exp $
+# $Id: config.in,v 1.14 2001/11/17 00:40:03 doogie Exp $
# Domains
$gEmailDomain = "bugs.something"; # e.g. bugs.debian.org
$gMaintainerFile = "$gConfigDir/Maintainers";
$gMaintainerFileOverride = "$gConfigDir/Maintainers.override";
$gPseudoDescFile = "$gConfigDir/pseudo-packages.description";
+$gPackageSource = "$gConfigDir/indices/sources";