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
commit0242bb96fe48ad5acfe86c1c86608f2ddf709cbd (patch)
tree9383897e171ebda74faadb3171fba501678432f5 /lib
parent77557b19d89c1562044662dee57245b473e349b1 (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