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

Andreas Tille tille at alioth.debian.org
Tue Jun 9 21:50:04 UTC 2009


Author: tille
Date: 2009-06-09 21:50:03 +0000 (Tue, 09 Jun 2009)
New Revision: 1473

Modified:
   udd/sql/ftpnew.sql
   udd/udd/ftpnew_gatherer.py
Log:
Distribution field is in packages table so also feature it in new_packages


Modified: udd/sql/ftpnew.sql
===================================================================
--- udd/sql/ftpnew.sql	2009-06-09 21:29:13 UTC (rev 1472)
+++ udd/sql/ftpnew.sql	2009-06-09 21:50:03 UTC (rev 1473)
@@ -49,6 +49,7 @@
        homepage text,
        section text,
        long_description text,
+       distribution text,
        license text,              -- trying to parse http://ftp-master.debian.org/new/<package>_<version>.html#binary-<package>-copyright field "License:"
     PRIMARY KEY (package, version, architecture)
 );

Modified: udd/udd/ftpnew_gatherer.py
===================================================================
--- udd/udd/ftpnew_gatherer.py	2009-06-09 21:29:13 UTC (rev 1472)
+++ udd/udd/ftpnew_gatherer.py	2009-06-09 21:50:03 UTC (rev 1473)
@@ -182,8 +182,8 @@
     query = """PREPARE ftpnew_insert_package
       AS INSERT INTO %s (package, version, architecture, maintainer, description, source,
          depends, recommends, suggests, enhances, pre_depends, breaks, replaces, provides, conflicts,
-                         installed_size, homepage, section, long_description, license)
-      VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)""" % (my_config['table_packages'])
+                         installed_size, homepage, section, long_description, distribution, license)
+      VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21)""" % (my_config['table_packages'])
     cur.execute(query)
 
     ftpnew_data      = open(my_config['path']+'/new.822')
@@ -245,6 +245,7 @@
               binpkgs.append(binpkg)
             binpkg = bin_pkg(value, srcpkg.s['Source'])
             print >>srco, "\nPackage: %s" % (value)
+            binpkg.b['Distribution'] = srcpkg.s['Distribution']
     	  elif field == 'Maintainer':
     	    # print "DEBUG %s: %s" % (field, value)
             if in_source:
@@ -410,7 +411,7 @@
                      %(Depends)s, %(Recommends)s, %(Suggests)s, %(Enhances)s,
                      %(Pre-Depends)s, %(Breaks)s, %(Replaces)s, %(Provides)s, %(Conflicts)s,
                      %(Installed-Size)s, %(Homepage)s, %(Section)s,
-                     %(Long_Description)s, %(License)s)"""
+                     %(Long_Description)s, %(Distribution)s, %(License)s)"""
           try:
             cur.execute(query, binpkg.b)
           except IntegrityError, err:




More information about the Collab-qa-commits mailing list