summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2021-06-16 18:21:05 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2021-06-16 18:25:26 +0200
commit7715968f818eded19d2b874a60ebf123d201caf6 (patch)
treeb0f644aa8cb062491b12f0a5585d5ad88d657d10 /lib
parentc9cda5234f8925aab3fd0747d1f2aa0b6a3a21ac (diff)
security_db: fix releasepart_to_number on non-main
For releases with a component (e.g. buster/non-free), releasepart_to_number was not spliting the component. This was causing bad sorting on CVE pages for packages in contrib or non-free.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/security_db.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index caf8ae67bc..c4f163cb7a 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -592,7 +592,10 @@ class DB:
def releasepart_to_number(r):
# expects a string in the form "codename (security)"
try:
+ # split the (optional) subrelease
u=r.split()[0]
+ # split the (optional) component
+ u=u.split('/')[0]
return release_to_number(u)
except ValueError:
return -1

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