/usr/lib/debbugs/summary is in debbugs 2.4.1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | #!/usr/bin/perl
# $Id: summary.in,v 1.8 2003/05/03 20:01:20 doogie Exp $
$config_path = '/etc/debbugs';
$lib_path = '/usr/lib/debbugs';
require("$config_path/config");
require("$lib_path/errorlib");
$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
chdir("$gSpoolDir") || die "chdir spool: $!\n";
#open(DEBUG,">&4");
$mode= shift(@ARGV);
open(M,"$gMaintainerFile") || &quit("open $gMaintainerFile: $!");
while (<M>) {
m/^(\S+)\s+(\S.*\S)\s*$/ || warn "$_ ?";
($a,$b)=($1,$2);
$a =~ y/A-Z/a-z/;
$maintainer{$a}= $b;
}
close(M);
open(M,"$gMaintainerFileOverride") || &quit("open $gMaintainerFileOverride: $!");
while (<M>) {
m/^(\S+)\s+(\S.*\S)\s*$/ || warn "$_ ?";
($a,$b)=($1,$2);
$a =~ y/A-Z/a-z/;
$maintainer{$a}= $b;
}
close(M);
defined($startdate= time) || &quit("failed to get time: $!");
opendir(DIR,"db-h") || &quit("opendir db-h: $!\n");
@dirs = sort { $a <=> $b } grep(s,^,db-h/,, grep(m/^\d+$/,readdir(DIR)));
closedir(DIR);
foreach my $dir (@dirs) {
opendir(DIR,$dir);
push @list, sort { $a <=> $b } grep(s/\.status$//,grep(m/^\d+\.status$/,readdir(DIR)));
closedir(DIR);
}
$head= $mode eq 'bymaint'
? ' Package Ref Subject'
: ' Ref Package Keywords/Subject Package maintainer';
$amonths=-1;
while (length($f=shift(@list))) {
if (!($data = lockreadbug($f))) { next; }
$_= $data->{package}; y/A-Z/a-z/; $_= $` if m/[^-+._a-z0-9]/;
$data->{maintainer}=
defined($maintainer{$_}) ? $maintainer{$_} :
length($_) ? "(unknown -- \`$_')" :
"(unknown)";
if ($mode eq 'undone' || $mode eq 'veryold') {
&unfilelock;
next if length($data->{done}) || length($data->{forwarded});
$cmonths= int(($startdate - $data->{date})/2592000); # 3600*24*30 (30 days)
next if $mode eq 'veryold' && $cmonths < 2;
if ($cmonths != $amonths) {
$msg= $cmonths == 0 ? "Submitted in the last month" :
$cmonths == 1 ? "Over one month old" :
$cmonths == 2 ? "Over two months old - attention is required" :
"OVER $cmonths MONTHS OLD - ATTENTION IS REQUIRED";
print "\n$msg:\n$head\n";
$amonths= $cmonths;
}
printf("%6d %-10.10s %-30.30s %-.31s\n", $f, $data->{package},
(length($data->{keywords}) ? $data->{keywords}.'/' : '').$data->{subject},
$data->{maintainer}) || &quit("output undone: $!");
} elsif ($mode eq 'bymaint') {
&unfilelock;
next if length($data->{done}) || length($data->{forwarded});
$string{$f}=
sprintf(" %-10.10s %6d %-.59s\n", $data->{package}, $f, $data->{subject});
$data->{maintainer}= "(unknown)" if $data->{maintainer} =~ m/^\(unknown \-\-/;
$maintainercnt{$data->{maintainer}}++;
$maintainerlist{$data->{maintainer}}.= " $f";
} else {
&quit("badmode $mode");
}
}
if ($mode eq 'bymaint') {
print("$head\n") || &quit("output head: $!");
for $m (sort { $maintainercnt{$a} <=> $maintainercnt{$b} } keys %maintainercnt) {
printf("\n%s (%d $gBugs):\n",$m,$maintainercnt{$m})
|| &quit("output mainthead: $!");
for $i (sort { $string{$a} cmp $string{$b} } split(/ /,$maintainerlist{$m})) {
printf($string{$i}) || &quit("output 1bymaint: $!");
}
}
}
close(STDOUT) || &quit("close stdout: $!");
|