From patchwork Fri Sep 21 11:37:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kleber Sacilotto de Souza X-Patchwork-Id: 973182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Gs5t4zp5z9sBZ; Fri, 21 Sep 2018 21:37:38 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1g3JkZ-0000kQ-UC; Fri, 21 Sep 2018 11:37:31 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1g3JkZ-0000kF-9x for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 11:37:31 +0000 Received: from mail-ed1-f70.google.com ([209.85.208.70]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1g3JkZ-0000U1-2T for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 11:37:31 +0000 Received: by mail-ed1-f70.google.com with SMTP id l14-v6so1228636eda.7 for ; Fri, 21 Sep 2018 04:37:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=al9oho7NSkXlqWbxgNh/qVCWUrSDwzYjfk0F7uOuwgU=; b=Z39vfp7A0EM9gt2bs/u69otqsD8i2EVQIn874ELGLuMgqa/cUKFGhXZQF48eb/jaSc K0eS4P7siaqCkfoAQjY4RFAOYWhT4yCimWKHpUKg+fnVh60r6GpprEexLHt9fe5XatJW A9KDTLLF19AOJNALVhYmsZEQGR7a9ZGQj8lFzWMK+mEIUJuvgrq76ssXfVUzQqYrXofL Olvgj1O4J43zpbHW3ovyXXAtxPHAfoowX7OHp2HFNw5FUVptiaBzVsb5nmAW2QVYzjBC DqptzO4JeUUNGcTHTOuTQd5ZPKszXK/Mki8RnCAUN0j0wkgEgOUgWo4Y5iCQeENKlElM X1vQ== X-Gm-Message-State: APzg51DDoJiuRVNogCu5myDqjc8mXsEpq7v4r1CYSJVGRTqXwez6kzYc Q2SPIbWbNY1syGOXeyYJX3DrW6XHZWxQdWhNQSqy/4x6xBsFpiJhBxTgzqv6ElvmCaGnDv4nOd1 ZgY2d5qkYXasntiNCiya5ogemYWCGw68kc5jucQvq0w== X-Received: by 2002:a50:a105:: with SMTP id 5-v6mr7851591edj.186.1537529850443; Fri, 21 Sep 2018 04:37:30 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb3B32L1biXL4zXztjussHKQwg4A2bQJrn3DignydmDEPT7mQKvo36ivUf4VffZgXDzNf2lBw== X-Received: by 2002:a50:a105:: with SMTP id 5-v6mr7851570edj.186.1537529850172; Fri, 21 Sep 2018 04:37:30 -0700 (PDT) Received: from localhost (84-199-88-153.iFiber.telenet-ops.be. [84.199.88.153]) by smtp.gmail.com with ESMTPSA id r2-v6sm2244462eda.89.2018.09.21.04.37.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Sep 2018 04:37:29 -0700 (PDT) From: Kleber Sacilotto de Souza To: kernel-team@lists.ubuntu.com Subject: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit Date: Fri, 21 Sep 2018 13:37:28 +0200 Message-Id: <20180921113728.2577-1-kleber.souza@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 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" The package tracking bug number is not inserted anymore on the changelog by the link-to-tracker script. Instead, it creates/updates the debian./tracking-bug file and commits the change. We want this commit to be added to the changelog in a similar fashion as before, as the first entry. So change the git-ubuntu-log script to detect that commit and insert it in the right place. Ignore: yes Signed-off-by: Kleber Sacilotto de Souza Acked-by: Thadeu Lima de Souza Cascardo Acked-by: Stefan Bader --- debian/scripts/misc/git-ubuntu-log | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/debian/scripts/misc/git-ubuntu-log b/debian/scripts/misc/git-ubuntu-log index 490ecce73c48..4bf738f8fed1 100755 --- a/debian/scripts/misc/git-ubuntu-log +++ b/debian/scripts/misc/git-ubuntu-log @@ -28,13 +28,19 @@ def add_entry(entry): else: combo = '__mainline__' else: - if combo not in keys: - keys.append(combo) + if entry.get('subject', "") == 'UBUNTU: link-to-tracker: update tracking bug': + # Construct a key with '__trackingbug__' on the first position + # and the tracking bug number afterwards + combo.insert(0, '__trackingbug__') + # Tracking bug goes at the top + keys.insert(0, combo) + else: + if combo not in keys: + keys.append(combo) entry['key'] = combo entries.append(entry) - # Suck up the git log output and extract the information we need. keys = [] entry = None @@ -90,6 +96,10 @@ for key in keys: for bug in key: if bug.startswith('CVE-'): title_set.append(bug) + elif bug == '__trackingbug__': + # Look for the tracking bug number on the second + # position of the key + continue else: bug_info = None @@ -132,8 +142,9 @@ for key in keys: emit_title = False - title_lines = textwrap.wrap(entry['subject'], 76) - print(' - ' + title_lines[0]) - for line in title_lines[1:]: - line = line.replace('LP###', 'LP: #') - print(' ' + line) + if key[0] != '__trackingbug__': + title_lines = textwrap.wrap(entry['subject'], 76) + print(' - ' + title_lines[0]) + for line in title_lines[1:]: + line = line.replace('LP###', 'LP: #') + print(' ' + line)