[Popcon-developers] Bug#238687: Submit Debian release and subarchs

Falk Hueffner falk at debian.org
Sat Oct 8 15:40:35 UTC 2005


Hi,

to decide what subarchitectures should be supported in future
releases, it would really be helpful to see which are in current
use. So I suggest something like the following patch. It only
determines this information for Alpha, since I'm not sure how to get
it for other architectures, and in particular, which categories would
be relevant. Opinions?

-- 
	Falk

--- popularity-contest~	2005-07-18 08:15:52.000000000 +0200
+++ popularity-contest	2005-10-08 17:24:52.000000000 +0200
@@ -57,7 +57,25 @@
 # Architecture.
 my $debarch = `dpkg --print-installation-architecture`;
 chomp $debarch;
+my $subarch = "";
+if ( $debarch eq "alpha" ) {
+  $subarch = `awk '/^cpu model/ { print \$4; exit }' /proc/cpuinfo`;
+  chomp $subarch;
+  # possible values: EV3 EV4 Simulate LCA4 EV5 EV45 EV56 EV6 PCA56 PCA57
+  #                  EV67 EV68CB EV68AL EV68CX EV7 EV79 EV69
+  # canonify to relevant subarchs
+  if ( $subarch =~ /^(EV3|Simulate|LCA4|EV45)$/ ) { $subarch = "EV4";   }
+  if ( $subarch =~ /^(PCA57)$/ )		  { $subarch = "PCA56"; }
+  if ( $subarch =~ /^(EV68.*|EV7.*)$/ )		  { $subarch = "EV67";  }
+  # possible values now: EV4 EV5 EV56 PCA56 EV6 EV67
+}
 
+# Debian version.
+my $debver = `cat /etc/debian_version`;
+chomp $debver;
+# Accept only numeric versions and "testing/unstable"
+if ( ! $debver =~ /^(\d+(\.\d+)*|testing\/unstable)$/ ) { $debver = "" }
+  
 # Set if dpkg package version is older than 1.10, thus missing dpkg-query.
 my $olddpkg = 0;
 if ( ! -x "/usr/bin/dpkg-query" ) {
@@ -133,7 +151,7 @@
 # add a header/footer.
 	
 print "POPULARITY-CONTEST-0 TIME:",time," ID:$HOSTID ".
-    "ARCH:$debarch POPCONVER:$popconver\n";
+    "ARCH:$debarch SUBARCH:$subarch DEBVER:$debver POPCONVER:$popconver\n";
 
 for (sort { $popcon{$b}[0] <=> $popcon{$a}[0] } keys %popcon)
 {




More information about the Popcon-developers mailing list