diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2021-06-16 18:21:05 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2021-06-16 18:25:26 +0200 |
commit | cb1591068d83afd47c32583d4fec1b8c1e48c746 (patch) | |
tree | f22f295206de5664f525eb8298884a8e82ef8039 /lib | |
parent | 36c1d981ff47385f0b7e2a71a1b658d7feb5a759 (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.py | 3 |
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 |