From patchwork Thu Oct 19 13:09:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 828064 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=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3yHq5w3ZFFz9t42; Fri, 20 Oct 2017 00:09:56 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1e5Aa6-0003C5-Ht; Thu, 19 Oct 2017 13:09:50 +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 1e5Aa4-0003BW-Tm for kernel-team@lists.ubuntu.com; Thu, 19 Oct 2017 13:09:48 +0000 Received: from mail-qk0-f200.google.com ([209.85.220.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1e5Aa4-0005uj-KS for kernel-team@lists.ubuntu.com; Thu, 19 Oct 2017 13:09:48 +0000 Received: by mail-qk0-f200.google.com with SMTP id t5so8565600qkc.14 for ; Thu, 19 Oct 2017 06:09:48 -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=T2/aRsVk04bR0ImGXmvmLL1wBPpQ43witXxHa/O2umE=; b=S45EKsq26Zs3OHj1gPhaJqIqPkaiJM10KWliBcEmue+rrROYWm8P1DmJRjB0L1ftvS +Q7lZm+yVM2DGlbojdnO9LmIk1G4+u7fJpC7A0nXdhxXKGBKG/Fa3D2jmkTmOfkOpEzc Dnzh+PojNcaugQ+/C7BHjOJ1U+bMLqySbRvc5mF9xTM3gChRi+8/ik+Mh4mZFnCkGmWJ I/5qD6dFgtMLel5TgF3w97TIt2M7+m+VUr/HNZp5zQ49wsW09ws0IMeRHGs2/rfle9iZ iSSJgnUA/ugh+AlNHi6s+Nc4FHiCHWc8GBarB7RlnB1vsMCpWdPTIaxlTKuUa6YyZd0X datQ== X-Gm-Message-State: AMCzsaWsteVGWSaOmJHRs9sSZPmZvyL0Eu1yyPFoNj5Q1GM0bZ1JCa/7 4lXm6uvNUk/UBwCp0rW2SrlahxSze8+Tgbl0NIcGHK9SSFwpLqUrU5OhpP5L1IN3TqSThsB60FM lmXRl/5svpH+mrmNDXAfLuL6cfU/EouQxuR4cH87Y X-Received: by 10.200.3.8 with SMTP id q8mr1921918qtg.57.1508418587524; Thu, 19 Oct 2017 06:09:47 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RC/Xd8fk54t5EREI9LHY2if+S0adPP5w4mu/Mb/GYQnHnBGVAH0O+dDlEYpmSkGPAaTBdicw== X-Received: by 10.200.3.8 with SMTP id q8mr1921892qtg.57.1508418587222; Thu, 19 Oct 2017 06:09:47 -0700 (PDT) Received: from localhost.localdomain (189-19-122-247.dsl.telesp.net.br. [189.19.122.247]) by smtp.gmail.com with ESMTPSA id n4sm9090026qkh.8.2017.10.19.06.09.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 06:09:46 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels Date: Thu, 19 Oct 2017 11:09:39 -0200 Message-Id: <1508418579-10679-1-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 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" Parse the derivative own bugs and changelog in separate and use that when checking the state of each bug and searching for miscellaneous entries instead. Signed-off-by: Marcelo Henrique Cerri Acked-by: Marcelo Henrique Cerri Acked-by: Kleber Sacilotto de Souza Acked-by: Thadeu Lima de Souza Cascardo Tested-by: Thadeu Lima de Souza Cascardo --- ktl/debian.py | 17 +++++++++++++++++ maintscripts/verify-release-ready | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ktl/debian.py b/ktl/debian.py index ef530d2651fd..230741235974 100644 --- a/ktl/debian.py +++ b/ktl/debian.py @@ -52,6 +52,8 @@ class Debian: bug_rc = compile("LP:\s*#[0-9]+(?:\s*,\s*#[0-9]+)*") bug_nr_rc = compile("#([0-9]+)") + parent_bug_section_rc = compile("^\s*\[ Ubuntu: .*\]") + # debian_directories # @classmethod @@ -154,7 +156,10 @@ class Debian: raise DebianError("The first line in the changelog is not a version line.") content = [] + own_content = [] bugs = [] + own_bugs = [] + parsing_own_bugs = True for line in changelog_contents: m = cls.version_line_rc.match(line) @@ -176,8 +181,10 @@ class Debian: section['series'] = release section['pocket'] = pocket section['content'] = content + section['own-content'] = own_content section['package'] = package section['bugs'] = set(bugs) + section['own-bugs'] = set(own_bugs) m = cls.version_rc.match(version) if m is not None: @@ -189,14 +196,24 @@ class Debian: retval.append(section) content = [] + own_content = [] bugs = [] + own_bugs = [] + parsing_own_bugs = True else: + if cls.parent_bug_section_rc.match(line): + parsing_own_bugs = False + # find bug numbers and append them to the list for bug_line_match in finditer(cls.bug_rc, line): bug_matches = findall(cls.bug_nr_rc, bug_line_match.group(0)) bugs.extend(bug_matches) + if parsing_own_bugs: + own_bugs.extend(bug_matches) content.append(line) + if parsing_own_bugs: + own_content.append(line) return retval diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready index 8530b44c0623..e0dbfe68b049 100755 --- a/maintscripts/verify-release-ready +++ b/maintscripts/verify-release-ready @@ -328,7 +328,7 @@ class VerifyReleaseReady(): # entries were inserted by debian/scripts/misc/git-ubuntu-log msg = 'no "Miscellaneous" entries' changelog = Debian.changelog() - content = changelog[1]['content'] + content = changelog[1]['own-content'] for line in content: m = re.match("\* Miscellaneous .* changes$", line.strip()) if m: @@ -339,7 +339,7 @@ class VerifyReleaseReady(): def verify_changelog_bugs(s): changelog = Debian.changelog() - changelog_bugs = changelog[1]['bugs'] + changelog_bugs = changelog[1]['own-bugs'] changelog_series = changelog[1]['series'] changelog_source_package = changelog[1]['package']