diff options
author | Brian May <brian@linuxpenguins.xyz> | 2019-12-04 17:09:23 +1100 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2019-12-04 17:12:50 +1100 |
commit | 70102c96934397f3b3ed2a5a1988d4968ea8dfba (patch) | |
tree | dd13fe78a86827c6b1e71b8eb23aa7bcd2c8f8da /bin/tracker_service.py | |
parent | b81f9c8032bec020f47fa074aa7061448f88a7d9 (diff) |
Fix references to DLA regression updates on website
The first revision on the website doesn't have a postfix.
The second revision has a postfix of -2.
I was going to do something similar for DSA too, but found regression update
advisories are not available on the website for DSAs.
Diffstat (limited to 'bin/tracker_service.py')
-rwxr-xr-x | bin/tracker_service.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/tracker_service.py b/bin/tracker_service.py index 9f45dab8a8..d45d83b6a1 100755 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -1570,16 +1570,20 @@ Debian bug number.'''), % (int(y), int(number))) return None - def url_dla(self, url, dla, re_dla=re.compile(r'^DLA-(\d+)(?:-\d+)?$')): + def url_dla(self, url, dla, re_dla=re.compile(r'^DLA-(\d+)(-\d+)?$')): match = re_dla.match(dla) if match: + (number,revision) = match.groups() + if revision == "-1": + link = "dla-%d" % int(number) + else: + link = dla.lower() # We must determine the year because there is no generic URL. - (number,) = match.groups() for (date,) in self.db.cursor().execute( "SELECT release_date FROM bugs WHERE name = ?", (dla,)): (y, m, d) = date.split('-') - return url.absolute("https://www.debian.org/lts/security/%d/dla-%d" - % (int(y), int(number))) + return url.absolute("https://www.debian.org/lts/security/%d/%s" + % (int(y), link)) return None def url_debian_bug(self, url, debian): |