[Popcon-commits] cvs commit to popularity-contest by pere
pere at cvs.alioth.debian.org
pere at cvs.alioth.debian.org
Sat Jul 23 18:40:06 UTC 2005
Update of /cvsroot/popcon/popularity-contest
In directory haydn:/tmp/cvs-serv13241
Modified Files:
popcon.pl
Log Message:
Change popcon.pl to read section info from the stable branch as
well, and make sure it keep working even if one of the sections
are empty.
Index: popcon.pl
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popcon.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- popcon.pl 23 Jul 2005 08:13:12 -0000 1.18
+++ popcon.pl 23 Jul 2005 18:40:03 -0000 1.19
@@ -208,7 +208,9 @@
}
mark "Reading legacy packages...";
-for $file (glob("$mirrorbase/dists/testing/*/binary-*/Packages"),glob("$mirrorbase/dists/sid/*/binary-*/Packages"))
+for $file (glob("$mirrorbase/dists/stable/*/binary-*/Packages"),
+ glob("$mirrorbase/dists/testing/*/binary-*/Packages"),
+ glob("$mirrorbase/dists/sid/*/binary-*/Packages"))
{
open AVAIL, "$file";
while(<AVAIL>)
@@ -296,6 +298,7 @@
for $sec (".", at dists)
{
my @list = grep {$section{$_} =~ /^$sec/ } @pkgs;
+ make_sec $sec;
make_by ($sec, $_, \%pkg, @list) for (@fields);
}
make_sec "maint";
@@ -408,7 +411,9 @@
$port="kfreebsd-gnu/" if ($port eq "kfreebsd/");
printf HTML "<a href=\"http://www.debian.org/ports/$port\">%-16s</a> : %-10s <a href=\"stat/sub-$f.png\">graph</a>\n",$f,$arch{$f};
}
- printf HTML "%-16s : %-10s <a href=\"stat/sub-unknown.png\">graph</a>\n","unknown",$arch{"unknown"};
+ if (exists $arch{"unknown"}) {
+ printf HTML "%-16s : %-10s <a href=\"stat/sub-unknown.png\">graph</a>\n","unknown",$arch{"unknown"}
+ }
print HTML <<'EOF';
</pre></td>
<td>
@@ -423,7 +428,9 @@
{
printf HTML "%-16s : %-10s \n",$f,$release{$f};
}
- printf HTML "%-16s : %-10s \n","unknown",$release{"unknown"};
+ if (exists $release{"unknown"}) {
+ printf HTML "%-16s : %-10s \n","unknown",$release{"unknown"};
+ }
print HTML <<'EOF';
</pre></td>
<td>
More information about the Popcon-commits
mailing list