Commit cd31288b authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Stefan Bader

UBUNTU: avoid duplicate CVE numbers in changelog

BugLink: http://bugs.launchpad.net/bugs/1604344Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Acked-by: default avatarLuis Henriques <luis.henriques@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 59ae8c6d
......@@ -12,17 +12,22 @@ import textwrap
sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach())
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
entries = []
def add_entry(entry):
if entry and 'ignore' not in entry:
if 'bugs' not in entry and 'cves' in entry:
for cve in entry['cves']:
if cve not in bugs:
bugs.append(cve)
entries.append(entry)
# Suck up the git log output and extract the information we need.
bugs = []
entries = []
entry = None
subject_wait = False
for line in sys.stdin:
if line.startswith('commit '):
if entry and 'ignore' not in entry:
if 'bugs' not in entry and 'cves' in entry:
bugs += entry['cves']
entries.append(entry)
add_entry(entry)
entry = {}
subject_wait = True
......@@ -49,11 +54,7 @@ for line in sys.stdin:
elif line.startswith(' Ignore:'):
entry['ignore'] = True
if entry and 'ignore' not in entry:
if 'bugs' not in entry and 'cves' in entry:
bugs += entry['cves']
entries.append(entry)
add_entry(entry)
entries.reverse()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment