[Collab-qa-commits] r2095 - in udd: sql udd

Iain Lane laney at alioth.debian.org
Thu Dec 1 23:55:51 UTC 2011


Author: laney
Date: 2011-12-01 23:55:51 +0000 (Thu, 01 Dec 2011)
New Revision: 2095

Modified:
   udd/sql/setup.sql
   udd/udd/lintian_gatherer.py
Log:
Add package_arch and package_version columns to {ubuntu_,}lintian

New lintian lab output format contains this extra data.



Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql	2011-11-28 13:43:09 UTC (rev 2094)
+++ udd/sql/setup.sql	2011-12-01 23:55:51 UTC (rev 2095)
@@ -410,6 +410,8 @@
   package TEXT NOT NULL,
   tag_type lintian_tagtype NOT NULL,
   package_type TEXT,
+  package_version debversion,
+  package_arch TEXT,
   tag TEXT NOT NULL,
   information TEXT
 );
@@ -420,6 +422,8 @@
   package TEXT NOT NULL,
   tag_type lintian_tagtype NOT NULL,
   package_type TEXT,
+  package_version debversion,
+  package_arch TEXT,
   tag TEXT NOT NULL,
   information TEXT
 );

Modified: udd/udd/lintian_gatherer.py
===================================================================
--- udd/udd/lintian_gatherer.py	2011-11-28 13:43:09 UTC (rev 2094)
+++ udd/udd/lintian_gatherer.py	2011-12-01 23:55:51 UTC (rev 2095)
@@ -46,8 +46,8 @@
     cur.execute("DELETE FROM %s" % my_config["table"])
 
     cur.execute("""PREPARE lintian_insert 
-      AS INSERT INTO %s (package, package_type, tag, tag_type, information)
-      VALUES ($1, $2, $3, $4, $5)""" % (my_config['table']))
+      AS INSERT INTO %s (package, package_type, package_version, package_arch, tag, tag_type, information)
+      VALUES ($1, $2, $3, $4, $5, $6, $7)""" % (my_config['table']))
 
     lintian_data = file(my_config['path'])
     line_number = 0
@@ -72,14 +72,14 @@
            (pkg == 'manpages-zh' and tag == 'manpage-has-errors-from-man') or \
            (pkg == 'mplayer' and tag == 'manpage-has-errors-from-man'):
           extra = '' # HACK psycopg2.DataError: invalid byte sequence for encoding "UTF8": 0xbb
-        entries.append((pkg, pkg_type, tag, lintian_gatherer.code_to_tag_type_map[code], extra))
+        entries.append((pkg, pkg_type, vers, arch, tag, lintian_gatherer.code_to_tag_type_map[code], extra))
 #      elif not lintian_gatherer.ignore_re.match(line):
 #        print "Can't parse line %d: %s" % (line_number, line.rstrip())
 
     # for e in entries:
       # print e
       # cur.executemany("EXECUTE lintian_insert (%s, %s, %s, %s, %s)", [e])
-    cur.executemany("EXECUTE lintian_insert (%s, %s, %s, %s, %s)", entries)
+    cur.executemany("EXECUTE lintian_insert (%s, %s, %s, %s, %s, %s, %s)", entries)
     cur.execute("DEALLOCATE lintian_insert")
     cur.execute("ANALYZE %s" % my_config["table"])
 




More information about the Collab-qa-commits mailing list