while(<I>)
{
if (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\S+)\s+\[\s*([^]]*)\s*\]\s+(\w+)\s+(.*)$/) {
- my $x = $bugfunc->(pkg => $1, bug => $2, status => $4,
+ my @x = $bugfunc->(pkg => $1, bug => $2, status => $4,
submitter => $5, severity => $6, tags => $7);
- $count{$x}++;
+ local $_;
+ $count{$_}++ foreach @x;
}
}
close I;
my %sortkey = ();
if ($indexon eq "pkg") {
$tag = "package";
- %count = countbugs(sub {my %d=@_; return $d{"pkg"}});
+ %count = countbugs(sub {my %d=@_; return splitpackages($d{"pkg"})});
$note = "<p>Note that with multi-binary packages there may be other\n";
$note .= "reports filed under the different binary package names.</p>\n";
foreach my $pkg (keys %count) {
} elsif ($indexon eq "maint") {
$tag = "maintainer";
%count = countbugs(sub {my %d=@_;
- return emailfromrfc822($maintainers{$d{"pkg"}} || "");
+ return map {
+ emailfromrfc822($maintainers{$_}) || ()
+ } splitpackages($d{"pkg"});
});
$note = "<p>Note that maintainers may use different Maintainer fields for\n";
$note .= "different packages, so there may be other reports filed under\n";
my @bugs;
if (defined $pkg) {
$tag = "package $pkg";
- @bugs = @{getbugs(sub {my %d=@_; return $pkg eq $d{"pkg"}}, 'package', $pkg)};
+ @bugs = @{getbugs(sub {my %d=@_;
+ return grep($pkg eq $_, splitpackages($d{"pkg"}))
+ }, 'package', $pkg)};
} elsif (defined $src) {
$tag = "source $src";
my @pkgs = getsrcpkgs($src);
push @pkgs, $src if ( !grep(/^\Q$src\E$/, @pkgs) );
- @bugs = @{getbugs(sub {my %d=@_; return grep($d{"pkg"} eq $_, @pkgs)}, 'package', @pkgs)};
+ @bugs = @{getbugs(sub {my %d=@_;
+ foreach my $try (splitpackages($d{"pkg"})) {
+ return 1 if grep($try eq $_, @pkgs);
+ }
+ return 0;
+ }, 'package', @pkgs)};
} elsif (defined $maint) {
my %maintainers = %{getmaintainers()};
$tag = "maintainer $maint";
}
if ($maint eq "") {
@bugs = @{getbugs(sub {my %d=@_; my $me;
- ($me = $maintainers{$d{"pkg"}}||"") =~ s/\s*\(.*\)\s*//;
- $me = $1 if ($me =~ m/<(.*)>/);
- return $me eq $maint;
- })};
+ foreach my $try (splitpackages($d{"pkg"})) {
+ ($me = $maintainers{$try} || "")
+ =~ s/\s*\(.*\)\s*//;
+ $me = $1 if ($me =~ m/<(.*)>/);
+ return 1 if $me eq $maint;
+ }
+ return 0;
+ })};
} else {
@bugs = @{getbugs(sub {my %d=@_; my $me;
- ($me = $maintainers{$d{"pkg"}}||"") =~ s/\s*\(.*\)\s*//;
- $me = $1 if ($me =~ m/<(.*)>/);
- return $me eq $maint;
- }, 'package', @pkgs)};
+ foreach my $try (splitpackages($d{"pkg"})) {
+ ($me = $maintainers{$try} || "")
+ =~ s/\s*\(.*\)\s*//;
+ $me = $1 if ($me =~ m/<(.*)>/);
+ return 1 if $me eq $maint;
+ }
+ return 0;
+ }, 'package', @pkgs)};
}
} elsif (defined $maintenc) {
my %maintainers = %{getmaintainers()};
$tag = "encoded maintainer $maintenc";
@bugs = @{getbugs(sub {my %d=@_;
- return maintencoded($maintainers{$d{"pkg"}} || "")
- eq $maintenc
- })};
+ foreach my $try (splitpackages($d{"pkg"})) {
+ return 1 if
+ maintencoded($maintainers{$try} || "") eq
+ $maintenc;
+ }
+ return 0;
+ })};
} elsif (defined $submitter) {
$tag = "submitter $submitter";
@bugs = @{getbugs(sub {my %d=@_; my $se;