Author: fw
Date: 2008-06-17 19:52:49 +0000 (Tue, 17 Jun 2008)
New Revision: 9090

Modified:
   lib/python/security_db.py
Log:
lib/python/security_db.py: Do not detect binary package notes


Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py   2008-06-17 12:24:38 UTC (rev 9089)
+++ lib/python/security_db.py   2008-06-17 19:52:49 UTC (rev 9090)
@@ -985,7 +985,7 @@
                               % (b.source_file, b.source_line, `rel`, rel_ver))
 
         if self.verbose:
-            print "  checking source/binary packages"
+            print "  checking source packages"
         cursor.execute(
             """UPDATE package_notes SET package_kind = 'unknown'
             WHERE package_kind IN ('source', 'binary')""")
@@ -999,40 +999,7 @@
             WHERE package_kind = 'unknown'
             AND EXISTS (SELECT * FROM removed_packages AS p
                         WHERE p.name = package_notes.package)""")
-        cursor.execute(
-            """UPDATE package_notes SET package_kind = 'binary'
-            WHERE package_kind = 'unknown'
-            AND EXISTS (SELECT * FROM binary_packages AS p
-                        WHERE p.name = package_notes.package)""")
 
-        for (bug_name, s_package, b_package) in list(cursor.execute(
-            """SELECT DISTINCT s.bug_name, s.package, b.package
-            FROM package_notes AS s, package_notes AS b, binary_packages AS p
-            WHERE s.bug_name = b.bug_name
-            AND s.package_kind = 'source'
-            AND b.package_kind = 'binary'
-            AND p.name = b.package AND p.source = s.package""")):
-            b = bugs.BugFromDB(cursor, bug_name)
-            result.append("%s:%d: source and binary package annotations"
-                          % (b.source_file, b.source_line))
-            result.append("%s:%d: source package: %s"
-                          % (b.source_file, b.source_line, s_package))
-            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))
-
         for (bug_name, package) in list(cursor.execute(
             """SELECT n.bug_name, n.package
             FROM package_notes AS n
@@ -1045,35 +1012,6 @@
             result.append("%s:%d: ITPed package %s is in the archive"
                           % (b.source_file, b.source_line, package))
 
-        if False:
-            # The following check looks useful, but there are
-            # situations where we want to be very explicit about
-            # vulnerable binary packges (see CAN-2004-0914 and
-            # DSA-573-1).
-            for (bug_name, source_package, b1, b2) in list(cursor.execute(
-                """SELECT n.bug_name, b.source,
-                MIN(n.package) AS n1, MAX(n.package) AS n2
-                FROM package_notes AS n, binary_packages AS b
-                WHERE n.package_kind = 'binary' AND b.name = n.package
-                GROUP BY n.bug_name, b.source
-                HAVING n1 <> n2""")):
-                b = bugs.BugFromDB(cursor, bug_name)
-                result.append(
-                "%s:%d: source package %s is referenced multiple times:"
-                              % (b.source_file, b.source_line, source_package))
-                result.append("%s:%d: binary package: %s"
-                              % (b.source_file, b.source_line, b1))
-                result.append("%s:%d: binary package: %s"
-                              % (b.source_file, b.source_line, b2))
-
-        for (bug_name, pkg_name, release) in list(cursor.execute(
-            """SELECT DISTINCT bug_name, package, release FROM package_notes
-            WHERE package_kind = 'binary' AND release <> ''""")):
-            b = bugs.BugFromDB(cursor, bug_name)
-            result.append("%s:%d: binary package %s used with release %s"
-                          % (b.source_file, b.source_line, `pkg_name`,
-                             `release`))
-
         if result:
             return result
 


_______________________________________________
Secure-testing-commits mailing list
Secure-testing-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/secure-testing-commits

Reply via email to