[Popcon-commits] cvs commit to popularity-contest by ballombe
popcon-commits@lists.alioth.debian.org
popcon-commits@lists.alioth.debian.org
Sun, 08 Feb 2004 10:45:22 +0100
Update of /cvsroot/popcon/popularity-contest
In directory quantz:/tmp/cvs-serv12874
Modified Files:
popanal.py
Log Message:
Back out previous patch (i386-gnu is the canonical name) instead
Change popcon.pl.
Count releases as per DEBVER tag.
Rename host_arch to arch
Index: popanal.py
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popanal.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- popanal.py 7 Feb 2004 10:23:01 -0000 1.5
+++ popanal.py 8 Feb 2004 09:45:20 -0000 1.6
@@ -34,7 +34,8 @@
deplist = {}
provlist = {}
complained = {}
-host_arch_list = {}
+release_list = {}
+arch_list = {}
subcount = 0
@@ -108,7 +109,8 @@
start_date = 0
- host_arch = "unknown"
+ arch = "unknown"
+ release= "unknown"
# initialize a new entry with known data
def __init__(self, version, owner_id, date):
@@ -154,10 +156,15 @@
sectlist[UNKNOWN].append(package)
votelist[package].vote_for(package, self.entries[package])
- if not host_arch_list.has_key(self.host_arch):
- host_arch_list[self.host_arch] = 1
+ if not release_list.has_key(self.release):
+ release_list[self.release] = 1
else:
- host_arch_list[self.host_arch] = host_arch_list[self.host_arch] + 1
+ release_list[self.release] = release_list[self.release] + 1
+
+ if not arch_list.has_key(self.arch):
+ arch_list[self.arch] = 1
+ else:
+ arch_list[self.arch] = arch_list[self.arch] + 1
def headersplit(pairs):
header = {}
@@ -192,13 +199,14 @@
ewrite('#%s' % subcount)
e = Submission(0, header['ID'], header['TIME'])
+ if header.has_key('DEBVER'):
+ e.release = header['DEBVER']
+
if header.has_key('ARCH'):
if header['ARCH']=='x86_64':
- e.host_arch = 'amd64'
- elif header['ARCH']=='i386-gnu':
- e.host_arch = 'hurd'
+ e.arch = 'amd64'
else:
- e.host_arch = header['ARCH']
+ e.arch = header['ARCH']
elif split[0]=='END-POPULARITY-CONTEST-0' and e != None:
header = headersplit(split[1:])
@@ -234,10 +242,13 @@
# dump the results
out = open('results', 'w')
out.write("Submissions: %8d\n" % subcount)
+for release in release_list.keys():
+ out.write("Release: %-30s %5d\n"
+ % (release, release_list[release]))
-for host_arch in host_arch_list.keys():
+for arch in arch_list.keys():
out.write("Architecture: %-30s %5d\n"
- % (host_arch, host_arch_list[host_arch]))
+ % (arch, arch_list[arch]))
for section in sectlist.keys():
for package in sectlist[section]:
fv = votelist[package]