[Popcon-commits] cvs commit to popularity-contest by pere
popcon-commits@lists.alioth.debian.org
popcon-commits@lists.alioth.debian.org
Wed, 21 Jan 2004 23:46:44 +0100
Update of /cvsroot/popcon/popularity-contest
In directory quantz:/tmp/cvs-serv5225
Modified Files:
popularity-contest
Log Message:
Collect and report the content of /etc/debian_version.
Index: popularity-contest
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popularity-contest,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- popularity-contest 20 Oct 2003 11:59:39 -0000 1.3
+++ popularity-contest 21 Jan 2004 22:46:42 -0000 1.4
@@ -47,6 +47,15 @@
my ($arch,$os)=split('-',$Config{archname});
my $debarch= ($os eq 'linux') ? $arch : "$arch-$os";
+# Fetch debian version number. Example values are "3.0" and
+# "testing/unstable"
+my $debver;
+if ( -e "/etc/debian_version" && open(RELEASEFILE, "</etc/debian_version")) {
+ $debver = <RELEASEFILE>;
+ chomp $debver;
+ close(RELEASEFILE);
+}
+
# Initialise time computations
my $now = time;
@@ -102,7 +111,8 @@
# We're not done yet. Sort the output in reverse by atime, and
# add a header/footer.
-print "POPULARITY-CONTEST-0 TIME:",time," ID:$HOSTID ARCH:$debarch\n";
+print "POPULARITY-CONTEST-0 TIME:",time," ID:$HOSTID ".
+ "ARCH:$debarch DEBVER:$debver\n";
for (sort { $popcon{$b}[0] <=> $popcon{$a}[0] } keys %popcon)
{
@@ -110,4 +120,3 @@
}
print "END-POPULARITY-CONTEST-0 TIME:",time,"\n";
-