Author: lucas
Date: 2008-08-08 19:26:25 +0000 (Fri, 08 Aug 2008)
New Revision: 1013

Modified:
   udd/src/setup-db.sql
   udd/src/udd/packages_gatherer.py
Log:
add more columns to the packages table

Modified: udd/src/setup-db.sql
===================================================================
--- udd/src/setup-db.sql        2008-08-08 19:03:42 UTC (rev 1012)
+++ udd/src/setup-db.sql        2008-08-08 19:26:25 UTC (rev 1013)
@@ -2,16 +2,22 @@
   (package text, version text, architecture text, maintainer text, description
     text, source text, source_version text, essential text, depends text,
     recommends text, suggests text, enhances text, pre_depends text,
-    installed_size int, homepage text, size int, md5sum text, distribution
-    text, release text, component text,
+    installed_size int, homepage text, size int,
+    build_essential text, origin text, sha1 text, replaces text, section text,
+    md5sum text, bugs text, priority text, tag text, task text, python_version 
text,
+    provides text, conflicts text, sha256 text, original_maintainer text,
+    distribution text, release text, component text,
   PRIMARY KEY (package, version, architecture, distribution, release, 
component));
 
 CREATE TABLE ubuntu_packages
   (package text, version text, architecture text, maintainer text, description
     text, source text, source_version text, essential text, depends text,
     recommends text, suggests text, enhances text, pre_depends text,
-    installed_size int, homepage text, size int, md5sum text, distribution
-    text, release text, component text,
+    installed_size int, homepage text, size int,
+    build_essential text, origin text, sha1 text, replaces text, section text,
+    md5sum text, bugs text, priority text, tag text, task text, python_version 
text,
+    provides text, conflicts text, sha256 text, original_maintainer text,
+    distribution text, release text, component text,
   PRIMARY KEY (package, version, architecture, distribution, release, 
component));
 
 CREATE TABLE sources

Modified: udd/src/udd/packages_gatherer.py
===================================================================
--- udd/src/udd/packages_gatherer.py    2008-08-08 19:03:42 UTC (rev 1012)
+++ udd/src/udd/packages_gatherer.py    2008-08-08 19:26:25 UTC (rev 1013)
@@ -26,8 +26,11 @@
       'Description': 0}
   non_mandatory = {'Source': 0, 'Essential': 0, 'Depends': 0, 'Recommends': 0,
       'Suggests': 0, 'Enhances': 0, 'Pre-Depends': 0, 'Installed-Size': 0,
-      'Homepage': 0, 'Size': 0, 'MD5Sum': 0}
-  ignorable = ()
+      'Homepage': 0, 'Size': 0, 'Build-Essential':0, 'Origin':0,
+      'SHA1':0, 'Replaces':0, 'Section':0, 'MD5sum':0, 'Bugs':0, 'Priority':0,
+      'Tag':0, 'Task':0, 'Python-Version':0, 'Provides':0, 'Conflicts':0,
+      'SHA256':0, 'Original-Maintainer':0}
+  ignorable = {'Filename':0}
 
   warned_about = {}
   # A mapping from <package-name><version> to 1 If <package-name><version> is
@@ -112,7 +115,10 @@
          %(Description)s, %(Source)s, %(Source_Version)s, %(Essential)s,
          %(Depends)s, %(Recommends)s, %(Suggests)s, %(Enhances)s,
          %(Pre-Depends)s, %(Installed-Size)s, %(Homepage)s, %(Size)s,
-         %(MD5Sum)s)""" % d
+         %(Build-Essential)s, %(Origin)s, %(SHA1)s,
+         %(Replaces)s, %(Section)s, %(MD5sum)s, %(Bugs)s, %(Priority)s,
+         %(Tag)s, %(Task)s, %(Python-Version)s, %(Provides)s,
+         %(Conflicts)s, %(SHA256)s, %(Original-Maintainer)s)""" % d
       try:
        cur.execute(query)
       except psycopg2.ProgrammingError:
@@ -165,11 +171,15 @@
          cur.execute("""PREPARE package_insert AS INSERT INTO %s
            (Package, Version, Architecture, Maintainer, Description, Source,
            Source_Version, Essential, Depends, Recommends, Suggests, Enhances,
-           Pre_Depends, Installed_Size, Homepage, Size, MD5Sum, Distribution,
-           Release, Component)
+           Pre_Depends, Installed_Size, Homepage, Size,
+           build_essential, origin, sha1, replaces, section,
+            md5sum, bugs, priority, tag, task, python_version,
+            provides, conflicts, sha256, original_maintainer,
+           Distribution, Release, Component)
          VALUES
            ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15,
-             $16, $17, '%s', '%s', '%s')
+             $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28,
+             $29, $30, $31, '%s', '%s', '%s')
            """ %  (table, self._distr, src_cfg['release'], comp))
          aux.print_debug("Reading file " + path)
          # Copy content from gzipped file to temporary file, so that apt_pkg is


_______________________________________________
Collab-qa-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/collab-qa-commits

Reply via email to