summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2021-11-10 12:26:49 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2021-11-10 16:18:32 +0100
commit78c0d589acdb622bf4272797ece495cf30f7ae73 (patch)
treef3135490c41fecf83feb1cbfead5de2fb569abfe /bin
parent7a0a1bab96d26e2a4e8863a40720963860731c2c (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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lts-missing-uploads.py18
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 = []

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