From 78c0d589acdb622bf4272797ece495cf30f7ae73 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 10 Nov 2021 12:26:49 +0100 Subject: 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. --- bin/lts-missing-uploads.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bin') 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'(?Pmsg\d+.html).*\[DLA (?P[\d-]+)\] (?P[^\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 = [] -- cgit v1.2.3