[vivid/master-next 1/1] UBUNTU: avoid duplicate CVE numbers in changelog
Andy Whitcroft
apw at canonical.com
Tue Jul 19 15:20:25 UTC 2016
BugLink: http://bugs.launchpad.net/bugs/1604344
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian/scripts/misc/git-ubuntu-log | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/debian/scripts/misc/git-ubuntu-log b/debian/scripts/misc/git-ubuntu-log
index 8948768..eee983f 100755
--- a/debian/scripts/misc/git-ubuntu-log
+++ b/debian/scripts/misc/git-ubuntu-log
@@ -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()
--
2.8.1
More information about the kernel-team
mailing list