summaryrefslogtreecommitdiffstats
path: root/bin/tracker_data.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-01-31 09:47:53 +0000
committerGuido Günther <agx@sigxcpu.org>2016-01-31 09:47:53 +0000
commitd3351ae716aa15afbc19a4ff97d0d346bbfd295e (patch)
tree673cc590fccf5fe45b206fd72c9bf7844f24fa43 /bin/tracker_data.py
parent1952b5b65f7e55e8d4d88891300e5b54f658cc25 (diff)
Add lts-needs-forward-port
This looks for issues fixed in LTS but yet unfixed in lts_next taking into account next-oldstable-point-update.txt. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@39374 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/tracker_data.py')
-rw-r--r--bin/tracker_data.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/tracker_data.py b/bin/tracker_data.py
index 28f8a7f17a..e1b97ae4f6 100644
--- a/bin/tracker_data.py
+++ b/bin/tracker_data.py
@@ -103,6 +103,7 @@ class TrackerData(object):
with open(self.cached_data_path, 'r') as f:
self.data = json.load(f)
self.load_dsa_dla_needed()
+ self.load_point_updates()
@classmethod
def parse_needed_file(self, inputfile):
@@ -137,6 +138,27 @@ class TrackerData(object):
with open(os.path.join(self.DATA_DIR, 'dla-needed.txt'), 'r') as f:
self.dla_needed = self.parse_needed_file(f)
+ @classmethod
+ def parse_point_update_file(self, inputfile):
+ CVE_RE = 'CVE-[0-9]{4}-[0-9X]{4}'
+ result = {}
+ for line in inputfile:
+ res = re.match(CVE_RE, line)
+ if res:
+ cve = res.group(0)
+ result[cve] = {}
+ continue
+ elif line.startswith('\t['):
+ dist, _, pkg, ver = line.split()
+ result[cve][pkg] = ver
+ return result
+
+ def load_point_updates(self):
+ with open(os.path.join(self.DATA_DIR, 'next-oldstable-point-update.txt'), 'r') as f:
+ self.oldstable_point_update = self.parse_point_update_file(f)
+ with open(os.path.join(self.DATA_DIR, 'next-point-update.txt'), 'r') as f:
+ self.stable_point_update = self.parse_point_update_file(f)
+
def iterate_packages(self):
"""Iterate over known packages"""
for pkg in self.data:

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