[Popcon-commits] cvs commit to popularity-contest by ballombe

ballombe at cvs.alioth.debian.org ballombe at cvs.alioth.debian.org
Tue Sep 8 15:03:29 UTC 2009


Update of /cvsroot/popcon/popularity-contest
In directory alioth:/tmp/cvs-serv7976

Modified Files:
	popcon.pl 
Log Message:
 * popcon.pl:
   - sync with popcon.debian.org version: add source (max) ratings.


Index: popcon.pl
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popcon.pl,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- popcon.pl	10 Mar 2009 10:34:36 -0000	1.29
+++ popcon.pl	8 Sep 2009 15:03:27 -0000	1.30
@@ -2,7 +2,7 @@
 
 $results="../popcon-mail/results";
 $popcon="../www";
-my $mirrorbase = "/org/ftp.root/debian";
+my $mirrorbase = "/org/ftp.debian.org/ftp";
 my $docurlbase = "";
 %popconver=("1.28" => "sarge", "1.41" => "etch", "1.46" => "lenny");
 %popver=();
@@ -124,12 +124,18 @@
 #The fields below are the sum for all the packages maintained by that
 #developer:
 EOF
-"source" => <<"EOF");
+"source" => <<"EOF",
 #<name> is the source package name;
 #
 #The fields below are the sum for all the binary packages generated by
 #that source package:
 EOF
+"sourcemax" => <<"EOF");
+#<name> is the source package name;
+#
+#The fields below are the maximum for all the binary packages generated by
+#that source package:
+EOF
 
 sub make_by
 {
@@ -203,6 +209,7 @@
 %winner=();
 %maintpkg=();
 %sourcepkg=();
+%sourcemax=();
 @fields=("inst","vote","old","recent","no-files");
 
 for $file ("slink","slink-nonUS","potato","potato-nonUS",
@@ -284,6 +291,9 @@
 		  $pkg{$name}->{$f}=$v;
 		  $maintpkg{$maint{$name}}->{$f}+=$v;
 		  $sourcepkg{$source{$name}}->{$f}+=$v;
+                  my($sm)=$sourcemax{$source{$name}}->{$f};
+		  $sourcemax{$source{$name}}->{$f}=$v 
+                    if (!defined($sm) || $sm < $v);
 	  }
   }
   elsif ($type eq "Architecture:")
@@ -328,6 +338,7 @@
 }
 make ("maint", \%maintpkg, @maints);
 make ("source", \%sourcepkg, @sources);
+make ("sourcemax", \%sourcemax, @sources);
 
 for $sec (@dists)
 {
@@ -401,9 +412,12 @@
 	printf HTML ("<p>Statistics by maintainers sorted by fields: <pre>",$sec);
 	print_by ("maint",$_) for (@fields);
 	print HTML ("</pre>\n </p> \n");
-	printf HTML ("<p>Statistics by source packages sorted by fields: <pre>",$sec);
+	printf HTML ("<p>Statistics by source packages (sum) sorted by fields: <pre>",$sec);
 	print_by ("source",$_) for (@fields);
 	print HTML ("</pre>\n </p> \n");
+	printf HTML ("<p>Statistics by source packages (max) sorted by fields: <pre>",$sec);
+	print_by ("sourcemax",$_) for (@fields);
+	print HTML ("</pre>\n </p> \n");
 	printf HTML ("<p>Statistics for sections sorted by fields\n <pre>\n");
   	for $dir ("main","contrib","non-free","non-US","unknown")
 	{




More information about the Popcon-commits mailing list