From: cjwatson <>
Date: Thu, 22 May 2003 03:04:42 +0000 (-0800)
Subject: [project @ 2003-05-21 20:04:42 by cjwatson]
X-Git-Tag: release/2.6.0~910
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=637bafe924922b2d8824b8e5807861873d575f5a;p=debbugs.git
[project @ 2003-05-21 20:04:42 by cjwatson]
Add a source package mode to pkgindex.cgi.
---
diff --git a/cgi/pkgindex.cgi b/cgi/pkgindex.cgi
index 6654ef2..dc0af76 100755
--- a/cgi/pkgindex.cgi
+++ b/cgi/pkgindex.cgi
@@ -16,7 +16,7 @@ nice(5);
my %param = readparse();
my $indexon = $param{'indexon'} || 'pkg';
-if ($indexon !~ m/^(pkg|maint|submitter)$/) {
+if ($indexon !~ m/^(pkg|src|maint|submitter)$/) {
quitcgi("You have to choose something to index on");
}
@@ -69,6 +69,24 @@ if ($indexon eq "pkg") {
mainturl($maintainers{$pkg}),
htmlsanit($maintainers{$pkg} || "(unknown)"));
}
+} elsif ($indexon eq "src") {
+ $tag = "source package";
+ my $pkgsrc = getpkgsrc();
+ %count = countbugs(sub {my %d=@_;
+ return map {
+ $pkgsrc->{$_} || $_
+ } splitpackages($d{"pkg"});
+ });
+ $note = "";
+ foreach my $src (keys %count) {
+ $sortkey{$src} = lc $src;
+ $htmldescrip{$src} = sprintf('%s '
+ . '(maintainer: %s)',
+ srcurl($src),
+ htmlsanit($src),
+ mainturl($maintainers{$src}),
+ htmlsanit($maintainers{$src} || "(unknown)"));
+ }
} elsif ($indexon eq "maint") {
$tag = "maintainer";
%count = countbugs(sub {my %d=@_;