ACK: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels
Kleber Souza
kleber.souza at canonical.com
Mon Oct 23 11:13:23 UTC 2017
On 10/19/17 15:09, Marcelo Henrique Cerri wrote:
> 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 <marcelo.cerri at canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> ---
> 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']
>
>
More information about the kernel-team
mailing list