summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2019-12-03 14:54:55 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-02-26 12:31:30 +0100
commit1b9c4741e886afe5f2bf6a4583d977bac225bdad (patch)
treefcf2a7bcd09920379b8eb7a4b2dfceff9e2e7bfc /lib
parent129cdcc50f9d0f43eddff9c3a4799480e822e287 (diff)
security_db: don't hardcode the list of supported releases
At times there will just be two, so get that list from the config.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/security_db.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index a4281274a7..f77710ef5e 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -496,11 +496,12 @@ class DB:
ORDER BY sp.name, st.urgency, st.bug_name"""
% (testing, testing, testing))
- releases = (('stable', config.get_release_codename('stable')),
- ('oldstable', config.get_release_codename('oldstable')),
- ('oldoldstable', config.get_release_codename('oldoldstable')))
+ releases = config.get_supported_releases()
+ releases.remove(config.get_release_codename('testing'))
+ releases.remove('sid')
- for (name, nickname) in releases:
+ for release in releases:
+ alias = config.get_release_alias(release)
cursor.execute(
"""CREATE TEMPORARY VIEW %s_status AS
SELECT DISTINCT sp.name AS package, st.bug_name AS bug,
@@ -527,7 +528,7 @@ class DB:
AND secst.bug_name = st.bug_name
AND secst.package = secp.rowid), 0)
ORDER BY sp.name, urgency_to_number(urgency), st.bug_name"""
- % (name, nickname, nickname, nickname, nickname))
+ % (alias, release, release, release, release))
cursor.execute(
"""CREATE TEMPORARY VIEW debian_cve AS

© 2014-2024 Faster IT GmbH | imprint | privacy policy