diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2005-12-29 20:47:30 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2005-12-29 20:47:30 +0000 |
commit | ad0904a1f5ff5d37924f4f41751752c71fecbb88 (patch) | |
tree | e2fc1f33a8989a299741739ca5ff9d90fe3667d3 /lib | |
parent | 75ae33fbf28e638e6cddaae14b4ed977f964b4f8 (diff) |
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.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3179 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib')
-rw-r--r-- | lib/python/security_db.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py index 58af85213b..a9ca53d3c4 100644 --- a/lib/python/security_db.py +++ b/lib/python/security_db.py @@ -1473,9 +1473,14 @@ class DB: 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 |