[Secure-testing-commits] r14602 - lib/python

Florian Weimer fw at alioth.debian.org
Tue May 4 15:32:14 UTC 2010


Author: fw
Date: 2010-05-04 15:32:13 +0000 (Tue, 04 May 2010)
New Revision: 14602

Modified:
   lib/python/security_db.py
Log:
lib/python/security_db.py: total order only over source package versions

This saves some computations; we no longer rate binary packages for
vulnerabilities.


Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py	2010-05-04 15:08:59 UTC (rev 14601)
+++ lib/python/security_db.py	2010-05-04 15:32:13 UTC (rev 14602)
@@ -218,8 +218,6 @@
             source TEXT NOT NULL,
             source_version TEXT NOT NULL,
             archs TEXT NOT NULL,
-            version_id INTEGER NOT NULL DEFAULT 0,
-            source_version_id INTEGER NOT NULL DEFAULT 0,
             PRIMARY KEY (name, release, subrelease, archive, version, source,
             source_version))""")
         cursor.execute(
@@ -899,9 +897,7 @@
             """SELECT DISTINCT *
             FROM (SELECT fixed_version FROM package_notes
                 WHERE fixed_version IS NOT NULL
-            UNION ALL SELECT version FROM source_packages
-            UNION ALL SELECT version FROM binary_packages
-            UNION ALL SELECT source_version FROM binary_packages)"""):
+            UNION ALL SELECT version FROM source_packages)"""):
             versions.append(debian_support.Version(v))
 
         if self.verbose:
@@ -931,15 +927,6 @@
             WHERE version = source_packages.version)""")
 
         if self.verbose:
-            print "  updating binary packages"
-        cursor.execute(
-            """UPDATE binary_packages
-            SET version_id = (SELECT id FROM version_linear_order
-            WHERE version = binary_packages.version),
-            source_version_id = (SELECT id FROM version_linear_order
-            WHERE version = binary_packages.source_version)""")
-
-        if self.verbose:
             print "  finished"
         
     def calculateVulnerabilities(self, cursor):




More information about the Secure-testing-commits mailing list