commit 7c01e731e497d2c4dbb5d5a5c4c2e3977bffbed5 Author: Steven Roberts <strobert@xxxxxxxxxx> Date: Fri Feb 8 23:25:06 2013 -0800 Added pm_report patch from rt.cpan.org #83152 perl-Mail-Procmail.spec | 6 ++++- pm_report.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletions(-) --- diff --git a/perl-Mail-Procmail.spec b/perl-Mail-Procmail.spec index dc7b4aa..b8d9b2a 100644 --- a/perl-Mail-Procmail.spec +++ b/perl-Mail-Procmail.spec @@ -6,6 +6,8 @@ License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Mail-Procmail/ Source0: http://www.cpan.org/authors/id/J/JV/JV/Mail-Procmail-%{version}.tar.gz +# pm_report display,summing fixes [rt.cpan.org #83152] +Patch0: pm_report.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) @@ -27,6 +29,7 @@ mail using the power of Perl. %prep %setup -q -n Mail-Procmail-%{version} +%patch0 -p0 -b .pm_report %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -54,8 +57,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog -* Mon Feb 04 2013 Steven D. Roberts <strobert@xxxxxxxxxx> 1.08-4 +* Mon Feb 08 2013 Steven D. Roberts <strobert@xxxxxxxxxx> 1.08-4 - drop defattr. change to DESTDIR +- added pm_report [rt.cpan.org #83152] * Wed Jan 23 2013 Steven D. Roberts <strobert@xxxxxxxxxx> 1.08-3 - added some missing buildreqs diff --git a/pm_report.patch b/pm_report.patch new file mode 100644 index 0000000..5232037 --- /dev/null +++ b/pm_report.patch @@ -0,0 +1,50 @@ +Index: Procmail.pm +=================================================================== +RCS file: /home/strobert/cvs/perl5lib/Mail/Procmail.pm,v +retrieving revision 1.3 +diff -u -r1.3 Procmail.pm +--- Procmail.pm 5 Feb 2013 07:44:29 -0000 1.3 ++++ Procmail.pm 5 Feb 2013 07:52:05 -0000 +@@ -872,7 +872,7 @@ + $msgs++, next if /^\d+\.\d+ Mail from/; + + # Skip non-deliveries. +- next unless /^\d+\.\d+ (\w+\[[^\]]+\]):\s+(.+)/; ++ next unless /^\d+\.\d+ (deliver\[[^\]]+\]):\s+(.+?)(?:\s+(\d+))?$/; + $dlvr++; + + # Update stats and keep track of max values. +@@ -880,6 +880,7 @@ + $max1 = $t if ($t = ++$tally{$2}->[0]) > $max1; + $max2 = $t if ($t = ++$tally{$2}->[1]->{$1}) > $max2; + $max3 = $t if ($t = length($1)) > $max3; ++ $tally{$2}->[2] += $3; + } + + print STDOUT ("$recs records, $msgs messages, $dlvr deliveries.\n\n"); +@@ -887,11 +888,11 @@ + # Construct format for report. + $max1 = length($max1); + $max2 = length($max2); +- my $fmt = "%${max1}s %${max2}s %-${max3}s %s\n"; ++ my $fmt = "%${max1}s %${max2}s %-${max3}s %s %s\n"; + + # Sort on number of deliveries per target. + foreach my $dest ( sort { $b->[1] <=> $a->[1] } +- map { [ $_, $tally{$_}->[0], $tally{$_}->[1] ] } ++ map { [ $_, $tally{$_}->[0], $tally{$_}->[1], $tally{$_}->[2] ] } + keys %tally ) { + my $first = 1; + # Sort on deliveries per rule. +@@ -902,7 +903,10 @@ + ($first ? $dest->[1] : ""), + $rule->[1], + $rule->[0], +- ($first ? $dest->[0] : "")); ++ ($first ? $dest->[0] : ""), ++ ($atts{sizes} && $first ? $dest->[3] : ""), ++ #$rule->[2], ++ ); + $first = 0; + } + } -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel