[Secure-testing-commits] r16214 - bin lib/python

Michael Gilbert gilbert-guest at alioth.debian.org
Mon Feb 21 04:09:45 UTC 2011


Author: gilbert-guest
Date: 2011-02-21 04:09:38 +0000 (Mon, 21 Feb 2011)
New Revision: 16214

Modified:
   bin/tracker_service.py
   lib/python/security_db.py
Log:
show all DSAs on package pages (closes: #608994)

Modified: bin/tracker_service.py
===================================================================
--- bin/tracker_service.py	2011-02-20 22:15:36 UTC (rev 16213)
+++ bin/tracker_service.py	2011-02-21 04:09:38 UTC (rev 16214)
@@ -531,7 +531,7 @@
                 yield self.make_xref(url, bug), description
                 
         return self.create_page(
-            url, "Information on source package " + pkg,
+            url, 'Information on source package ' + pkg,
             [make_menu(lambda x: x,
                        (self.url_pts(url, pkg),
                         pkg + ' in the Package Tracking System'),
@@ -539,20 +539,27 @@
                         pkg + ' in the Bug Tracking System'),
                        (self.url_testing_status(url, pkg),
                         pkg + ' in the testing migration checker')),
-             H2("Available versions"),
-             make_table(gen_versions(), caption=("Release", "Version")),
+             H2('Available versions'),
+             make_table(gen_versions(), caption=('Release', 'Version')),
              
-             H2("Open issues"),
+             H2('Open issues'),
              make_table(gen_bug_list(self.db.getBugsForSourcePackage
                                      (self.db.cursor(), pkg, True)),
                         caption=('Bug', 'Description'),
                         replacement='No known open issues.'),
 
-             H2("Resolved issues"),
+             H2('Resolved issues'),
              make_table(gen_bug_list(self.db.getBugsForSourcePackage
                                      (self.db.cursor(), pkg, False)),
                         caption=('Bug', 'Description'),
-                        replacement='No known resolved issues.')])
+                        replacement='No known resolved issues.'),
+             
+             H2('Security Announcements'),
+             make_table(gen_bug_list(self.db.getDSAsForSourcePackage
+                                     (self.db.cursor(), pkg)),
+                        caption=('DSA', 'Description'),
+                        replacement='No known security announcements.')
+             ])
 
     def page_status_release_stable_oldstable(self, release, params, url):
         assert release in ('stable', 'oldstable')

Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py	2011-02-20 22:15:36 UTC (rev 16213)
+++ lib/python/security_db.py	2011-02-21 04:09:38 UTC (rev 16214)
@@ -1685,11 +1685,19 @@
 	    AND sp.subrelease <> 'security'
             AND st.package = sp.rowid
             AND bugs.name = st.bug_name
-            AND st.urgency <> 'unimportant'
+            AND bugs.name NOT LIKE 'DSA-%'
             GROUP BY bugs.name, bugs.description, sp.name)
             WHERE vulnerable = ?
             ORDER BY name""", (pkg, vulnerable))
 
+    def getDSAsForSourcePackage(self, cursor, package):
+        return cursor.execute(
+            """SELECT bugs.name, bugs.description
+            FROM bugs, package_notes as p
+            WHERE p.bug_name = bugs.name
+            AND bugs.name LIKE 'DSA-%'
+            AND p.package = ?""", (package,))
+
     def getTODOs(self, cursor=None, hide_check=False):
         """Returns a list of pairs (BUG-NAME, DESCRIPTION)."""
         if cursor is None:




More information about the Secure-testing-commits mailing list