From patchwork Tue Jul 19 15:20:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 650255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3rv3dg19MMz9s3s; Wed, 20 Jul 2016 01:20:39 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b=teEJ/UgI; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1bPWp2-0000Ur-3H; Tue, 19 Jul 2016 15:20:36 +0000 Received: from mail-wm0-f53.google.com ([74.125.82.53]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bPWow-0000Tf-D5 for kernel-team@lists.ubuntu.com; Tue, 19 Jul 2016 15:20:30 +0000 Received: by mail-wm0-f53.google.com with SMTP id f65so142631804wmi.0 for ; Tue, 19 Jul 2016 08:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6xPxHvNSPoZPIJ02KW8VTIZ7fulDtXGipRhQZTVY0qI=; b=teEJ/UgIA8Zal/5664VbVKLd5eJ7TOF1kJ2QZT+oPLi6r7PAo4jdEuvnLvXhKlEMi8 EI7gm8QOiTVhkmqRMq5cu2u+vTMXLhuyf8FUophUY3XrXAB+l+3MBiC1ojthVPhEJ7iM 1DutQKVfKj+sZz97AcZQb3cmS1xylRiR+K9hy2qXILUW1Z7Ns2d4E0AKdraCioAjEYfl gStEycOQMgdWwTlAM9jOtCgymAgDR7AehwqF1ra0Sv/kGlxqG0ojGSFkDzEwU8QnGQdX DIALEZeJOKnooNyfb/sbUHbgSCPasB+7SG/2zKnhWDXGS52LCrgDshbVv/1X94kAwUW0 AvyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6xPxHvNSPoZPIJ02KW8VTIZ7fulDtXGipRhQZTVY0qI=; b=dpAyVr4V3CJtQ1N9uxf89GAg3NW09zNSw3RQhEy34n+CCNTcfd/bkyXtZOFFJO7NQu JuCFc+s8ZIjtI0xvF80iuTq4r4V4bHj6jfpsV1bYeqHK1JTc5DsK+shO7LPorCxBrvwR QE8aB0V8Aw7TNRyntIAaBda5xTY76pSUM5jop8rUhLTORwj235YULetzHgCb1b6olf9Y hbfEVgfHj09KpAeGoBUwCOkNyp0uyeyaEuCM95VC64N9UkBj/S4lUusHy/22q5wTK4+1 vi6A92x3cGUc2ORCSzfdEk3ZUVSCXbvgGcyyukIUBMlDTZIxJkbyPlNH4g+XkS8ewvXB xu9w== X-Gm-Message-State: ALyK8tKyfyv4egcygKUa4Rm6GgJmK6ERNvrk4/rzYhqAQuptJy/4fhd0spW5ipt0UBBpwL0p X-Received: by 10.28.94.18 with SMTP id s18mr4849863wmb.44.1468941629652; Tue, 19 Jul 2016 08:20:29 -0700 (PDT) Received: from localhost ([2001:470:6973:2:e594:7252:cabf:10dd]) by smtp.gmail.com with ESMTPSA id 12sm23608013wmj.19.2016.07.19.08.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 08:20:29 -0700 (PDT) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [vivid/master-next 1/1] UBUNTU: avoid duplicate CVE numbers in changelog Date: Tue, 19 Jul 2016 16:20:25 +0100 Message-Id: <1468941625-8138-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1468941625-8138-1-git-send-email-apw@canonical.com> References: <1468941625-8138-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/1604344 Signed-off-by: Andy Whitcroft --- 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()