[Popcon-developers] [PATCH] lenny is now an obsolete release

Paul Wise pabs at debian.org
Mon Sep 24 06:12:22 UTC 2012


---
 popularity-contest/popanal.py         |    8 ++++++++
 popularity-contest/popcon.pl          |    2 +-
 popularity-contest/popularity-contest |    5 ++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/popularity-contest/popanal.py b/popularity-contest/popanal.py
index 49b2e4a..4edb19f 100755
--- a/popularity-contest/popanal.py
+++ b/popularity-contest/popanal.py
@@ -34,6 +34,7 @@ provlist = {}
 class Stat:
   def __init__(self):
     self.vote = {}
+    self.vendor = {}
     self.release = {}
     self.arch = {}
     self.count = 0
@@ -126,6 +127,7 @@ class Submission:
 
     arch = "unknown"
     release= "unknown"
+    vendor= "unknown"
 
     # initialize a new entry with known data
     def __init__(self, version, owner_id, date):
@@ -209,6 +211,12 @@ def read_submissions(stream):
                 ewrite('Invalid date: ' + header['TIME'] + ' for ID ' + header['ID'])
                 continue
 
+            if header.has_key('VENDOR'):
+                if header['VENDOR']=='':
+                    e.vendor = 'unknown'
+                else:
+                    e.vendor = header['VENDOR']
+        
             if header.has_key('POPCONVER'):
                 if header['POPCONVER']=='':
                     e.release = 'unknown'
diff --git a/popularity-contest/popcon.pl b/popularity-contest/popcon.pl
index ad88758..8d39ddf 100755
--- a/popularity-contest/popcon.pl
+++ b/popularity-contest/popcon.pl
@@ -517,7 +517,7 @@ sub read_packages
 {
   my ($file,$dist);
   for $file ("slink","slink-nonUS","potato","potato-nonUS",
-      "woody","woody-nonUS","sarge","etch")
+      "woody","woody-nonUS","sarge","etch","lenny")
   {
     open AVAIL, "<:utf8", "$file.sections" or die "Cannot open $file.sections";
     while(<AVAIL>)
diff --git a/popularity-contest/popularity-contest b/popularity-contest/popularity-contest
index 0339dcb..b8088e9 100755
--- a/popularity-contest/popularity-contest
+++ b/popularity-contest/popularity-contest
@@ -59,6 +59,9 @@ chomp $debarch;
 # Popcon release
 my $popconver=`dpkg-query --showformat='\${version}' --show popularity-contest`;
 
+# Vendor
+my $vendor=`dpkg-vendor --query Vendor`;
+
 # Initialise time computations
 
 my $now = time;
@@ -149,7 +152,7 @@ close PACKAGES;
 # add a header/footer.
 
 print "POPULARITY-CONTEST-0 TIME:",time," ID:$HOSTID ".
-    "ARCH:$debarch POPCONVER:$popconver\n";
+    "ARCH:$debarch POPCONVER:$popconver VENDOR:$vendor\n";
 
 for (sort { $popcon{$b}[0] <=> $popcon{$a}[0] } keys %popcon)
 {
-- 
1.7.10.4




More information about the Popcon-developers mailing list