summaryrefslogtreecommitdiffstats
path: root/bin/unsupported_packages.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-04 12:56:24 +0000
committerGuido Günther <agx@sigxcpu.org>2017-02-04 12:56:24 +0000
commitfa8c87b30ef14b8707dc0983ddf2f40d188ca178 (patch)
tree0b0d7beef6e00e7de6e8470d756021d7cab8ba42 /bin/unsupported_packages.py
parent4ad04e7b91141c7277df5dc71c851697fafe5d38 (diff)
lts-cve-triage: Allow to ignore packages with limited support
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@48706 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/unsupported_packages.py')
-rw-r--r--bin/unsupported_packages.py43
1 files changed, 29 insertions, 14 deletions
diff --git a/bin/unsupported_packages.py b/bin/unsupported_packages.py
index ffc0628847..134f779379 100644
--- a/bin/unsupported_packages.py
+++ b/bin/unsupported_packages.py
@@ -19,28 +19,18 @@ import requests
re_line = re.compile(r'(?!#)(?P<pkg>[^\s]+)')
-class UnsupportedPackages(set):
- URL = "https://anonscm.debian.org/cgit/collab-maint/debian-security-support.git/plain/security-support-ended.deb{}"
- CACHED_DATA_PATH = "~/.cache/security-support-ended.deb{}"
-
- def __init__(self, debian_version=7, update_cache=True):
- self.debian_version = debian_version
-
- self.cache = os.path.expanduser(self.CACHED_DATA_PATH).format(
- self.debian_version,
- )
+class DebSecSupport(set):
+ def __init__(self, update_cache):
if update_cache:
self.update_cache()
self.load()
def update_cache(self):
- url = self.URL.format(self.debian_version)
-
- print("Updating {} from {} ...".format(self.cache, url))
+ print("Updating {} from {} ...".format(self.cache, self.url))
- response = requests.get(url, allow_redirects=True)
+ response = requests.get(self.url, allow_redirects=True)
response.raise_for_status()
with open(self.cache, 'w') as f:
@@ -53,3 +43,28 @@ class UnsupportedPackages(set):
if m is not None:
self.add(m.group('pkg'))
+
+
+class UnsupportedPackages(DebSecSupport):
+ URL = "https://anonscm.debian.org/cgit/collab-maint/debian-security-support.git/plain/security-support-ended.deb{}"
+ CACHED_DATA_PATH = "~/.cache/security-support-ended.deb{}"
+
+ def __init__(self, debian_version=7, update_cache=True):
+ self.debian_version = debian_version
+ self.url = self.URL.format(self.debian_version)
+
+ self.cache = os.path.expanduser(self.CACHED_DATA_PATH).format(
+ self.debian_version,
+ )
+
+ super(UnsupportedPackages, self).__init__(update_cache)
+
+
+class LimitedSupportPackages(DebSecSupport):
+ URL = "https://anonscm.debian.org/cgit/collab-maint/debian-security-support.git/plain/security-support-limited"
+ CACHED_DATA_PATH = "~/.cache/security-support-limited"
+
+ def __init__(self, update_cache=True):
+ self.url = self.URL
+ self.cache = os.path.expanduser(self.CACHED_DATA_PATH)
+ super(LimitedSupportPackages, self).__init__(update_cache)

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