[Collab-qa-commits] r1063 - udd/src/udd

lucas at alioth.debian.org lucas at alioth.debian.org
Mon Aug 11 03:07:11 UTC 2008


Author: lucas
Date: 2008-08-11 03:07:11 +0000 (Mon, 11 Aug 2008)
New Revision: 1063

Modified:
   udd/src/udd/packages_gatherer.py
Log:
fill the summary tables

Modified: udd/src/udd/packages_gatherer.py
===================================================================
--- udd/src/udd/packages_gatherer.py	2008-08-11 03:05:48 UTC (rev 1062)
+++ udd/src/udd/packages_gatherer.py	2008-08-11 03:07:11 UTC (rev 1063)
@@ -174,7 +174,14 @@
 	except IOError, (e, message):
 	  print "Could not read packages from %s: %s" % (path, message)
 	cur.execute("DEALLOCATE package_insert")
+	# Fill the summary tables
+	cur.execute("TRUNCATE %s" % (table + '_summary'));
+	cur.execute("""INSERT INTO %s SELECT DISTINCT ON (package, version,
+	  distribution, release, component) package, version, source,
+	  source_version, maintainer, distribution, release, component FROM %s""" %
+	  (table + '_summary', table));
 
+
     self.connection.commit()
 
     self.print_warnings()




More information about the Collab-qa-commits mailing list