| 1 |
# /usr/bin/env python |
# /usr/bin/env python |
| 2 |
# Last-Modified: <Sun Aug 10 12:11:38 2008> |
# Last-Modified: <Sun Aug 17 11:29:52 2008> |
| 3 |
# This file is a part of the Ultimate Debian Database project |
# This file is a part of the Ultimate Debian Database project |
| 4 |
|
|
| 5 |
import debian_bundle.deb822 |
import debian_bundle.deb822 |
| 183 |
except IOError, (e, message): |
except IOError, (e, message): |
| 184 |
print "Could not read packages from %s: %s" % (path, message) |
print "Could not read packages from %s: %s" % (path, message) |
| 185 |
cur.execute("DEALLOCATE package_insert") |
cur.execute("DEALLOCATE package_insert") |
| 186 |
# Fill the summary tables |
# Fill the summary tables |
| 187 |
cur.execute("TRUNCATE %s" % (table + '_summary')); |
cur.execute("TRUNCATE %s" % (table + '_summary')); |
| 188 |
cur.execute("""INSERT INTO %s SELECT DISTINCT ON (package, version, |
cur.execute("""INSERT INTO %s SELECT DISTINCT ON (package, version, |
| 189 |
distribution, release, component) package, version, source, |
distribution, release, component) package, version, source, |
| 190 |
source_version, maintainer, distribution, release, component FROM %s""" % |
source_version, maintainer, distribution, release, component FROM %s""" % |
| 191 |
(table + '_summary', table)); |
(table + '_summary', table)); |
|
|
|
|
|
|
|
self.connection.commit() |
|
| 192 |
|
|
| 193 |
self.print_warnings() |
self.print_warnings() |
| 194 |
|
|