Author: fw
Date: 2005-12-29 20:47:30 +0000 (Thu, 29 Dec 2005)
New Revision: 3179
Modified:
lib/python/security_db.py
Log:
lib/python/security_db.py (DB.calculateDebsecan1):
Record versions of source packages from binary packages, too,
to include versions from binary-only NMUs. This is expected
to fix Debian bug #345158, reported against debsecan.
Modified: lib/python/security_db.py
==================================================================---
lib/python/security_db.py 2005-12-29 03:08:22 UTC (rev 3178)
+++ lib/python/security_db.py 2005-12-29 20:47:30 UTC (rev 3179)
@@ -1473,9 +1473,14 @@
if debian_support.Version(v) >= v_ref:
other_versions[v] = True
+ # The second part of this SELECT statement
+ # covers binary-only NMUs.
for (v,) in c.execute("""SELECT version
- FROM source_packages WHERE name = ?
- AND release = ? AND subrelease IN
('''', ''security'')""",
+ FROM source_packages WHERE name = ?1
+ AND release = ?2 AND subrelease IN
('''', ''security'')
+ UNION ALL SELECT source_version
+ FROM binary_packages WHERE source = ?1
+ AND release = ?2 AND subrelease IN
('''', ''security'')""",
(package, release)):
if debian_support.Version(v) >= v_ref:
other_versions[v] = True