[Popcon-developers] [PATCH] Report Alpha subarchitectures
Falk Hueffner
falk at debian.org
Sun Oct 1 13:47:26 UTC 2006
Hi,
once again, here's the Alpha subarch patch. Since the release is
coming closer, and this information is needed to decide what to
support for etch+1, I would be really grateful if somebody could
either apply it, or tell me exactly what is wrong with it.
Output in "results" will be something like:
Architecture: alpha 3
Subarchitecture: alpha/unknown 1
Subarchitecture: alpha/EV67 2
--
Falk
Index: popanal.py
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popanal.py,v
retrieving revision 1.15
diff -u -p -r1.15 popanal.py
--- popanal.py 19 Nov 2005 09:50:25 -0000 1.15
+++ popanal.py 1 Oct 2006 13:44:30 -0000
@@ -36,6 +36,7 @@ provlist = {}
complained = {}
release_list = {}
arch_list = {}
+subarch_list = {}
subcount = 0
mirrorbase = "/org/ftp.debian.org/ftp"
@@ -167,6 +168,11 @@ class Submission:
else:
arch_list[self.arch] = arch_list[self.arch] + 1
+ if not subarch_list.has_key(self.subarch):
+ subarch_list[self.subarch] = 1
+ else:
+ subarch_list[self.subarch] = subarch_list[self.subarch] + 1
+
def headersplit(pairs):
header = {}
for d in pairs:
@@ -218,6 +224,12 @@ def read_submissions(stream):
else:
e.arch = header['ARCH']
+ if header.has_key('SUBARCH') and header['SUBARCH']:
+ e.subarch = header['SUBARCH']
+ else:
+ e.subarch = 'unknown'
+ e.subarch = e.arch + '/' + e.subarch
+
elif split[0]=='END-POPULARITY-CONTEST-0' and e != None:
header = headersplit(split[1:])
if header.has_key('TIME'):
@@ -264,6 +276,9 @@ for release in release_list.keys():
for arch in arch_list.keys():
out.write("Architecture: %-30s %5d\n"
% (arch, arch_list[arch]))
+for subarch in subarch_list.keys():
+ out.write("Subarchitecture: %-30s %5d\n"
+ % (subarch, subarch_list[subarch]))
for section in sectlist.keys():
for package in sectlist[section]:
fv = votelist[package]
Index: popularity-contest
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popularity-contest,v
retrieving revision 1.15
diff -u -p -r1.15 popularity-contest
--- popularity-contest 28 Jul 2006 20:55:25 -0000 1.15
+++ popularity-contest 1 Oct 2006 13:44:30 -0000
@@ -58,6 +58,19 @@ if ( $HOSTID !~ /^([a-f0-9]{32})$/)
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 (those that gcc differentiates)
+ if ( $subarch =~ /^(EV3|Simulate|LCA4|EV45)$/ ) { $subarch = "EV4"; }
+ if ( $subarch =~ /^(PCA57)$/ ) { $subarch = "PCA56"; }
+ if ( $subarch =~ /^(EV68.*|EV69|EV7.*)$/ ) { $subarch = "EV67"; }
+ # possible values now: EV4 EV5 EV56 PCA56 EV6 EV67
+}
+
# 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 +146,7 @@ close PACKAGES;
# add a header/footer.
print "POPULARITY-CONTEST-0 TIME:",time," ID:$HOSTID ".
- "ARCH:$debarch POPCONVER:$popconver\n";
+ "ARCH:$debarch SUBARCH:$subarch POPCONVER:$popconver\n";
for (sort { $popcon{$b}[0] <=> $popcon{$a}[0] } keys %popcon)
{
More information about the Popcon-developers
mailing list