Author: fw
Date: 2010-05-04 16:42:46 +0000 (Tue, 04 May 2010)
New Revision: 14604
Modified:
lib/python/security_db.py
Log:
security_db.DB.getBugsForSourcePackage(): restrict to supported releases
Modified: lib/python/security_db.py
==================================================================---
lib/python/security_db.py 2010-05-04 15:35:22 UTC (rev 14603)
+++ lib/python/security_db.py 2010-05-04 16:42:46 UTC (rev 14604)
@@ -1671,7 +1671,8 @@
def getBugsForSourcePackage(self, cursor, pkg, vulnerable):
"""Returns a generator for a list of (BUG, DESCRIPTION)
pairs
- which have the requested status."""
+ which have the requested status. Only bugs affecting supported
+ releases are returned."""
return cursor.execute(
"""SELECT DISTINCT name, description
FROM (SELECT bugs.name AS name, bugs.description AS description,
@@ -1684,7 +1685,7 @@
ORDER BY st2.vulnerable DESC), 1)) AS vulnerable
FROM source_packages AS sp, source_package_status AS st, bugs
WHERE sp.name = ?
- AND sp.release <> ''woody''
+ AND sp.release IN (''lenny'', ''squeeze'',
''sid'')
AND sp.subrelease <> ''security''
AND st.package = sp.rowid
AND bugs.name = st.bug_name