summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2022-08-18 15:50:22 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2022-08-18 15:50:57 +0200
commit999e4cdf0d970523f250e3fe4b1a3da949237f6a (patch)
treea71e4430ea5fc933ffaeecba69f605860824972c /bin
parentb0fc6ed2b07753633f823e1ac40a39a997b6e80b (diff)
lts-missing-uploads: ignore DLAs for older releases
Otherwise we'll check the version in the old DLA against the current LTS's Sources.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lts-missing-uploads20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/lts-missing-uploads b/bin/lts-missing-uploads
index 81caab0d27..655209e5e8 100755
--- a/bin/lts-missing-uploads
+++ b/bin/lts-missing-uploads
@@ -32,6 +32,10 @@ import config
lts = config.get_supported_releases()[0]
+class DLAForAnotherRelease(Exception):
+ pass
+
+
class LTSMissingUploads(object):
MONTHS = 6
SOURCES = ['http://security.debian.org/dists/{}/updates/{}/source/Sources.gz'.format(lts, component)
@@ -52,8 +56,11 @@ class LTSMissingUploads(object):
dlas = {}
def download(x):
self.info("{source}: parsing announcement from {url} ...", **x)
- x.update(self.get_dla(x['url'])[0])
- dlas[x['source']] = x
+ try:
+ x.update(self.get_dla(x['url'])[0])
+ dlas[x['source']] = x
+ except DLAForAnotherRelease:
+ pass
for idx in range(self.MONTHS):
dt = datetime.datetime.utcnow().replace(day=1) - \
@@ -118,7 +125,7 @@ class LTSMissingUploads(object):
return result
def get_dla(self, url):
- return self.parse(url, self.re_version)
+ return self.parse(url, self.re_version, is_dla=True)
def get_sources(self):
pkgver = {}
@@ -135,9 +142,14 @@ class LTSMissingUploads(object):
return pkgver
- def parse(self, url, pattern):
+ def parse(self, url, pattern, is_dla=False):
result = []
+ # if parsing a specific DLA (as opposed to the DLAs list), check
+ # if the DLA is for the current LTS release, and ignore if not
+ if is_dla and lts not in self.session.get(url).content.decode('utf-8'):
+ raise DLAForAnotherRelease
+
for x in self.session.get(url).content.splitlines():
m = pattern.search(x.decode('utf8'))

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