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

Florian Weimer fw at costa.debian.org
Wed Sep 21 08:24:06 UTC 2005


Author: fw
Date: 2005-09-21 08:24:06 +0000 (Wed, 21 Sep 2005)
New Revision: 2067

Modified:
   lib/python/security_db.py
Log:
lib/python/security_db.py (DB.calculateVulnerabilities):
  Check that there is a single source package for a binary package
  annotation.


Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py	2005-09-21 08:17:48 UTC (rev 2066)
+++ lib/python/security_db.py	2005-09-21 08:24:06 UTC (rev 2067)
@@ -865,6 +865,19 @@
             result.append("%s:%d: binary package: %s"
                           % (b.source_file, b.source_line, b_package))
 
+        for (bug_name, package, s1, s2) in list(cursor.execute(
+            """SELECT n.bug_name, n.package,
+            MIN(bp.source) AS s1, MAX (bp.source) AS s2
+            FROM package_notes AS n, binary_packages AS bp
+            WHERE n.package_kind = 'binary' AND bp.name = n.package
+            GROUP BY n.bug_name, n.package
+            HAVING s1 <> s2""")):
+            b = bugs.BugFromDB(cursor, bug_name)
+            result.append("%s:%d: multiple source packages for package %s"
+                          % (b.source_file, b.source_line, package))
+            result.append("%s:%d: candidates are %s and %s"
+                          % (b.source_file, b.source_line, s1, s2))
+
         if False:
             # The following check looks useful, but there are
             # situations where we want to be very explicit about




More information about the Secure-testing-commits mailing list