Applied patch from bugs.debian.org/87176, which makes the code pass
references around, instead of copies, of hashes and arrays.
-my %maintainer = getmaintainers();
+my %maintainer = %{getmaintainers()};
my $ref = $param{'bug'} || quit("No bug number");
my $msg = $param{'msg'} || "";
my $boring = ($param{'boring'} || 'no') eq 'yes';
my $reverse = ($param{'reverse'} || 'no') eq 'yes';
my $ref = $param{'bug'} || quit("No bug number");
my $msg = $param{'msg'} || "";
my $boring = ($param{'boring'} || 'no') eq 'yes';
my $reverse = ($param{'reverse'} || 'no') eq 'yes';
-my %status = getbugstatus($ref) or &quit("Couldn't get bug status: $!");
+my %status = %{getbugstatus($ref)} or &quit("Couldn't get bug status: $!");
my $indexentry;
my $descriptivehead;
my $indexentry;
my $descriptivehead;
sub htmlindexentry {
my $ref = shift;
sub htmlindexentry {
my $ref = shift;
- my %status = getbugstatus($ref);
+ my %status = %{getbugstatus($ref)};
return htmlindexentrystatus(%status) if (%status);
return "";
}
return htmlindexentrystatus(%status) if (%status);
return "";
}
+ $b = $_[0];
+ my @bugs = @$b;
my %section = ();
my %displayshowpending = ("pending", "outstanding",
my %section = ();
my %displayshowpending = ("pending", "outstanding",
+ "fixed", "fixed in NMU",
"done", "resolved",
"forwarded", "forwarded to upstream software authors");
"done", "resolved",
"forwarded", "forwarded to upstream software authors");
}
foreach my $bug (sort {$a<=>$b} @bugs) {
}
foreach my $bug (sort {$a<=>$b} @bugs) {
- my %status = getbugstatus($bug);
+ my %status = %{getbugstatus($bug)};
next unless %status;
my @merged = sort {$a<=>$b} ($bug, split(/ /, $status{mergedwith}));
next unless ($common_repeatmerged || $bug == $merged[0]);
next unless %status;
my @merged = sort {$a<=>$b} ($bug, split(/ /, $status{mergedwith}));
next unless ($common_repeatmerged || $bug == $merged[0]);
my $result = "";
my $anydone = 0;
my $result = "";
my $anydone = 0;
- foreach my $pending (qw(pending forwarded done)) {
+ foreach my $pending (qw(pending forwarded fixed done)) {
foreach my $severity(@debbugs::gSeverityList) {
$severity = $debbugs::gDefaultSeverity if ($severity eq '');
next unless defined $section{${pending} . "_" . ${severity}};
foreach my $severity(@debbugs::gSeverityList) {
$severity = $debbugs::gDefaultSeverity if ($severity eq '');
next unless defined $section{${pending} . "_" . ${severity}};
}
while(<I>) {
if (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\S+)\s+\[\s*([^]]*)\s*\]\s+(\w+)\s+(.*)$/) {
}
while(<I>) {
if (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\S+)\s+\[\s*([^]]*)\s*\]\s+(\w+)\s+(.*)$/) {
- if ($bugfunc->(pkg => $1, bug => $2, status => $4,
- submitter => $5, severity => $6, tags => $7))
- {
+ my %hash = (pkg => $1, bug => $2, status => $4,
+ submitter => $5, severity => $6, tags => $7);
+ if ($bugfunc->(\%hash)) {
push (@result, $2);
}
}
}
close I;
}
push (@result, $2);
}
}
}
close I;
}
- return sort {$a <=> $b} @result;
+ @result = sort {$a <=> $b} @result;
+ return \@result;
$status{"pending"} = 'pending';
$status{"pending"} = 'forwarded' if (length($status{"forwarded"}));
$status{"pending"} = 'pending';
$status{"pending"} = 'forwarded' if (length($status{"forwarded"}));
+ $status{"pending"} = 'fixed' if ($status{"tags"} =~ /\bfixed\b/);
$status{"pending"} = 'done' if (length($status{"done"}));
$status{"pending"} = 'done' if (length($status{"done"}));
my $Archived = $archive ? "Archived" : "";
my $Archived = $archive ? "Archived" : "";
-my %maintainers = &getmaintainers();
+my %maintainers = %{&getmaintainers()};
my %strings = ();
$ENV{"TZ"} = 'UTC';
my %strings = ();
$ENV{"TZ"} = 'UTC';
my @bugs;
if (defined $pkg) {
$tag = "package $pkg";
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=@{$_[0]}; return $pkg eq $d{"pkg"}}, 'package', $pkg)};
} elsif (defined $maint) {
} elsif (defined $maint) {
- my %maintainers = getmaintainers();
+ my %maintainers = %{getmaintainers()};
$tag = "maintainer $maint";
my @pkgs = ();
foreach my $p (keys %maintainers) {
$tag = "maintainer $maint";
my @pkgs = ();
foreach my $p (keys %maintainers) {
$me = $1 if ($me =~ m/<(.*)>/);
push @pkgs, $p if ($me eq $maint);
}
$me = $1 if ($me =~ m/<(.*)>/);
push @pkgs, $p if ($me eq $maint);
}
- @bugs = getbugs(sub {my %d=@_; my $me;
+ @bugs = @{getbugs(sub {my %d=@{$_[0]}; my $me;
($me = $maintainers{$d{"pkg"}}||"") =~ s/\s*\(.*\)\s*//;
$me = $1 if ($me =~ m/<(.*)>/);
return $me eq $maint;
($me = $maintainers{$d{"pkg"}}||"") =~ s/\s*\(.*\)\s*//;
$me = $1 if ($me =~ m/<(.*)>/);
return $me eq $maint;
} elsif (defined $maintenc) {
} elsif (defined $maintenc) {
- my %maintainers = getmaintainers();
+ my %maintainers = %{getmaintainers()};
$tag = "encoded maintainer $maintenc";
$tag = "encoded maintainer $maintenc";
- @bugs = getbugs(sub {my %d=@_;
+ @bugs = @{getbugs(sub {my %d=@_;
return maintencoded($maintainers{$d{"pkg"}} || "")
eq $maintenc
return maintencoded($maintainers{$d{"pkg"}} || "")
eq $maintenc
} elsif (defined $submitter) {
$tag = "submitter $submitter";
} elsif (defined $submitter) {
$tag = "submitter $submitter";
- @bugs = getbugs(sub {my %d=@_; my $se;
+ @bugs = @{getbugs(sub {my %d=@_; my $se;
($se = $d{"submitter"} || "") =~ s/\s*\(.*\)\s*//;
$se = $1 if ($se =~ m/<(.*)>/);
return $se eq $submitter;
($se = $d{"submitter"} || "") =~ s/\s*\(.*\)\s*//;
$se = $1 if ($se =~ m/<(.*)>/);
return $se eq $submitter;
- }, 'submitter-email', $submitter);
+ }, 'submitter-email', $submitter)};
} elsif (defined $severity) {
$tag = "$status $severity bugs";
} elsif (defined $severity) {
$tag = "$status $severity bugs";
- @bugs = getbugs(sub {my %d=@_;
+ @bugs = @{getbugs(sub {my %d=@_;
return ($d{"severity"} eq $severity)
&& ($d{"status"} eq $status);
return ($d{"severity"} eq $severity)
&& ($d{"status"} eq $status);
-my $result = htmlizebugs(@bugs);
+my $result = htmlizebugs(\@bugs);
print "Content-Type: text/html\n\n";
print "Content-Type: text/html\n\n";
"</H1>\n";
if (defined $pkg) {
"</H1>\n";
if (defined $pkg) {
- my %maintainers = getmaintainers();
+ my %maintainers = %{getmaintainers()};
if (defined $maintainers{$pkg}) {
print "<p>Maintainer for $pkg is <a href=\""
. mainturl($maintainers{$pkg}) . "\">"
if (defined $maintainers{$pkg}) {
print "<p>Maintainer for $pkg is <a href=\""
. mainturl($maintainers{$pkg}) . "\">"