Min Sik Kim <minskim%NetBSD.org@localhost> wrote: > On May 8, 2005, at 2:34 PM, Jan Schaumann wrote: > >Attached find a patch to calculate and list the top-ten offenders in a > >bulk-build. I have used this in my last IRIX build for the > >pkgsrc-2005Q1 branch, but since post-build has changed a bit for > >pkgsrc-current, I'd like somebody else to test this before I commit > >it. > > > > I ran my recent Linux bulk build with the patch applied, but the > result doesn't include the top ten list. It only has a link. Hmm, strange. I just finished another build (though from the branch), and that worked fine, too. Just to make sure, here's the patch that applies to the branch -- it might need minor adjustment for -current. Could you try to weave that into your mk/bulk/post-build and see if it works? If you still have all the build-results, then you don't actually need to run a full bulk-build, but can just run post-build to see if it works fine... -Jan -- Free Speech Online - Stop Internet Censorship --- Electronic Frontier Foundation -- http://www.eff.org ---
Index: post-build
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/post-build,v
retrieving revision 1.48
diff -b -u -r1.48 post-build
--- post-build 23 Nov 2004 19:31:46 -0000 1.48
+++ post-build 13 May 2005 14:23:34 -0000
@@ -82,10 +82,10 @@
$report_head = <<EOF;
Package Breaks Maintainer
---------------------------------------------------------------
+----------------------------------------------------------------------
EOF
$report_form = <<EOF;
-@<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<
+@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<
$pkg $nbrokenby $maintainer
EOF
@@ -204,7 +204,7 @@
'<td align="right"
class="pkg-'.$state_style.'">'.$nbrokenby.'</td>'
if $nbrokenby > 0;
- if ($pinfo->{nerrors} != 0 && $verbose && $state eq "broken") {
+ if ($pinfo->{nerrors} != 0 && $verbose && ($state eq "broken" || $state
eq "topten")) {
print swrite($report_form, $pkg, $nbrokenby > 0 ? $nbrokenby :
"", $maintainer);
}
@@ -413,6 +413,7 @@
<p>
Jump to:<br/>
<ul>
+ <li><a href="#topten">Top Ten Offenders</a></li>
<li><a href="#broken">Broken packages</a></li>
<li><a href="#broken depends">Broken dependencies</a></li>
<li><a href="#not packaged">Not packaged</a></li>
@@ -422,19 +423,20 @@
EOHTML
my %state_head = (
+ "topten" => "Top Ten Offenders",
"broken" => "Broken packages",
"broken depends" => "Broken dependencies",
"not packaged" => "Not packaged"
);
- # only include broken packages in the email, see also pkgResult().
- if ($verbose && scalar(@{$broken->{"broken"}})) {
- print "\n\n$state_head{broken}\n\n";
+ foreach my $state ("topten", "broken", "broken depends", "not
packaged") {
+ next unless scalar(@{$broken->{$state}});
+
+ if ($verbose && ($state eq "topten" || $state eq "broken")) {
+ print "\n\n$state_head{$state}\n\n";
print $report_head;
}
- foreach my $state ("broken", "broken depends", "not packaged") {
- next unless scalar(@{$broken->{$state}});
print HTML <<EOHTML;
@@ -532,6 +534,12 @@
$res->{$state} = [ sort { $a->{pkg} cmp $b->{pkg} }
@{$res->{$state}} ];
}
+ $res->{"topten"} = [ sort { $b->{nbrokenby} <=> $a->{nbrokenby} }
@{$res->{"broken"}} ];
+
+ for (my $count = $#{$res->{"topten"}}; $count >= 10; $count--) {
+ pop(@{$res->{"topten"}});
+ }
+
return $res;
}
Attachment:
pgpczylDbVlVm.pgp
Description: PGP signature