[Popcon-commits] cvs commit to popularity-contest by pere
pere at cvs.alioth.debian.org
pere at cvs.alioth.debian.org
Tue Mar 18 09:26:18 UTC 2008
Update of /cvsroot/popcon/popularity-contest
In directory alioth:/tmp/cvs-serv25508
Modified Files:
popcon.pl
Log Message:
[ Petter Reinholdtsen ]
* Make sure popanal do not crash when an invalid timestamp is found
in the POPULARITY-CONTEST-0 header.
* Remove code in cron.weekly to sleep a random period of time up to
an hour, to test hypothesis that this was not the reason for the
increase in submissions seen the last few months. Possibly
reopens #440493, #459910.
* Change popcon.pl to handle the fact that
/org/ftp.root/debian/dists/stable/main/binary-*/Packages.gz is not
UTF-8. Otherwise it would croak on a name containing 'ó'.
Index: popcon.pl
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popcon.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- popcon.pl 20 Apr 2006 20:21:14 -0000 1.24
+++ popcon.pl 18 Mar 2008 09:26:16 -0000 1.25
@@ -224,7 +224,12 @@
{
/([^[:space:]]+)/ or die("incorrect package name");
$file = $1;#Untaint
- open AVAIL, "-|:utf8","zcat $file";
+ if ($file =~ m%/dists/stable/%) {
+ # Stable release (Etch) do not use UTF-8 in its package files
+ open AVAIL, "-|:iso-8859-1","zcat $file";
+ } else {
+ open AVAIL, "-|:utf8","zcat $file";
+ }
while(<AVAIL>)
{
/^Package: (.+)/ and do {$p=$1;$maint{$p}="bug";$source{$p}=$p;next;};
More information about the Popcon-commits
mailing list