+ foreach my $pkg (keys %count) {
+ $sortkey{$pkg} = lc $pkg;
+ $htmldescrip{$pkg} = sprintf('<a href="%s">%s</a> (%s)',
+ package_links(package => $pkg, links_only=>1),
+ html_escape($pkg),
+ package_links(maint=>$maintainers{$pkg}//['']));
+ }
+} elsif ($indexon eq "src") {
+ $tag = "source package";
+ my $pkgsrc = getpkgsrc();
+ if (defined $param{first}) {
+ %count = map {
+ if (/^\Q$param{first}\E/) {
+ ($_,$count{$_});
+ }
+ else {
+ ();
+ }
+ } keys %count;
+ }
+ %count = count_bugs(function => sub {my %d=@_;
+ return map {
+ $pkgsrc->{$_} || $_
+ } splitpackages($d{"pkg"});
+ },
+ archive => $archive,
+ );
+ $note = "";
+ foreach my $src (keys %count) {
+ $sortkey{$src} = lc $src;
+ $htmldescrip{$src} = sprintf('<a href="%s">%s</a> (%s)',
+ package_links(src => $src, links_only=>1),
+ html_escape($src),
+ package_links(maint => $maintainers{$src}//['']));
+ }