[kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Marcelo Henrique Cerri
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 <[hidden email]>
---
 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']
 
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Marcelo Henrique Cerri
Hi, Kamal.

The script looks perfectly fine for me. But is there a particular use or
motivation for it?

Acked-by: Marcelo Henrique Cerri <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Disregard ACK: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Marcelo Henrique Cerri
I replied to the wrong email.

--
Regards,
Marcelo

On Fri, Oct 20, 2017 at 09:47:55AM -0200, Marcelo Henrique Cerri wrote:
> Hi, Kamal.
>
> The script looks perfectly fine for me. But is there a particular use or
> motivation for it?
>
> Acked-by: Marcelo Henrique Cerri <[hidden email]>



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Kleber Souza
In reply to this post by Marcelo Henrique Cerri
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 <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  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']
>  
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Thadeu Lima de Souza Cascardo-3
In reply to this post by Marcelo Henrique Cerri
On Thu, Oct 19, 2017 at 11:09:39AM -0200, 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 <[hidden email]>
> ---

The idea is good and simple. I don't think we need to complicate it and
match the other bugs with the ones in master. So:

Acked-by: Thadeu Lima de Souza Cascardo <[hidden email]>

Also, I tested it with Ubuntu-raspi2-4.4.0-1076.84, and it works great.

Tested-by: Thadeu Lima de Souza Cascardo <[hidden email]>

>  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']
>  
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [kteam-tools][PATCH] verify-release-ready: ignore the parent changelog when checking derivative kernels

Marcelo Henrique Cerri
In reply to this post by Marcelo Henrique Cerri
--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (484 bytes) Download Attachment