]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_popcon2stats
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / nd_popcon2stats
index b0adecdfe4c60fae4f1b1fced3e2d4b1eb375197..8996076662e41321f1fec7d3b82fe0f87ee1836a 100755 (executable)
@@ -15,7 +15,8 @@ releases = {
     'etch': 'Debian GNU/Linux 4.0 (etch)',
     'lenny': 'Debian GNU/Linux 5.0 (lenny)',
     'squeeze': 'Debian GNU/Linux 6.0 (squeeze)',
-    'wheezy': 'Debian testing (wheezy)',
+    'wheezy': 'Debian GNU/Linux 7.0 (wheezy)',
+    'jessie': 'Debian testing (jessie)',
     'sid': 'Debian unstable (sid)',
     'hardy': 'Ubuntu 08.04 LTS "Hardy Heron" (hardy)',
     'jaunty': 'Ubuntu 09.04 "Jaunty Jackalope" (jaunty)',
@@ -28,6 +29,7 @@ releases = {
     'quantal': 'Ubuntu 12.10 "Quantal Quetzal" (quantal)',
     'raring': 'Ubuntu 13.04 "Raring Ringtail" (raring)',
     'saucy': 'Ubuntu 13.10 "Saucy Salamander" (saucy)',
+    'trusty': 'Ubuntu 14.04 LTS "Trusty Tahr" (trusty)',
 }
 
 def error(msg):
@@ -45,7 +47,8 @@ def read_popcon_stats(filename, read_packages=True):
     entry = dict(submissions = None,
                  package = {},
                  release = {},
-                 architecture = {})
+                 architecture = {},
+                 vendor = {})
 
     for line in fileinput.FileInput(filename, openhook=fileinput.hook_compressed):
         key, values = [x.strip().lower() for x in line.split(':', 1)]
@@ -57,13 +60,13 @@ def read_popcon_stats(filename, read_packages=True):
             except ValueError:
                 raise ValueError("Failed to split %s" % values)
             entry[key][pkg] = tuple(int(x) for x in (vote, old, recent, nofiles))
-        elif key in ('release', 'architecture'):
+        elif key in ('release', 'architecture', 'vendor'):
             kvalue, value = values.split()
             entry[key][kvalue] = int(value)
         elif key == 'submissions':
             entry[key] = int(values)
         else:
-            raise ValueError("Do not know how to handle line" % line)
+            raise ValueError("Do not know how to handle line %r" % line)
     return entry
 
 if __name__ == '__main__':