diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2021-11-10 12:26:49 +0100 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2021-11-10 16:18:32 +0100 |
commit | 2b30069b643ef4a570226190fbeb74710a8c4994 (patch) | |
tree | b7fe993f2f95e6673c415b785be8f741590937f0 | |
parent | e6ccd667ecc98f3f375c6e77e0b27e75fc56d453 (diff) |
bin/lts-missing-uploads.py: also get contrib & non-free
Otherwise we will crash if there's a DLA for a package in one of
those components.
-rwxr-xr-x | bin/lts-missing-uploads.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/lts-missing-uploads.py b/bin/lts-missing-uploads.py index 1c76c2f7b7..eb84a234df 100755 --- a/bin/lts-missing-uploads.py +++ b/bin/lts-missing-uploads.py @@ -28,7 +28,8 @@ from debian.debian_support import Version class LTSMissingUploads(object): MONTHS = 6 - SOURCES = 'http://security.debian.org/dists/stretch/updates/main/source/Sources.gz' + SOURCES = ['http://security.debian.org/dists/stretch/updates/{}/source/Sources.gz'.format(component) + for component in ('main', 'contrib', 'non-free')] re_line = re.compile( r'(?P<suffix>msg\d+.html).*\[DLA (?P<dla>[\d-]+)\] (?P<source>[^\s]+) security update.*' @@ -114,14 +115,19 @@ class LTSMissingUploads(object): return self.parse(url, self.re_version) def get_sources(self): - self.info("Downloading Sources from {} ...", self.SOURCES) + pkgver = {} + for src in self.SOURCES: + self.info("Downloading Sources from {} ...", src) - response = self.session.get(self.SOURCES) - response.raise_for_status() + response = self.session.get(src) + response.raise_for_status() - val = gzip.decompress(response.content).decode('utf-8') + val = gzip.decompress(response.content).decode('utf-8') - return {x['Package']: x['Version'] for x in Sources.iter_paragraphs(val)} + for x in Sources.iter_paragraphs(val): + pkgver[x['Package']] = x['Version'] + + return pkgver def parse(self, url, pattern): result = [] |