diff mbox

[kteam-tools] verify-release-ready: derive tag prefix from package name

Message ID 20170531152649.32489-1-cascardo@canonical.com
State New
Headers show

Commit Message

Thadeu Lima de Souza Cascardo May 31, 2017, 3:26 p.m. UTC
Instead of using gbp.conf for the tag prefix, use the package name.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---
 maintscripts/verify-release-ready | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Comments

Marcelo Henrique Cerri May 31, 2017, 3:54 p.m. UTC | #1

Kleber Sacilotto de Souza May 31, 2017, 4:07 p.m. UTC | #2
On 05/31/17 17:26, Thadeu Lima de Souza Cascardo wrote:
> Instead of using gbp.conf for the tag prefix, use the package name.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>  maintscripts/verify-release-ready | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
> index bff3dd65..485a972c 100755
> --- a/maintscripts/verify-release-ready
> +++ b/maintscripts/verify-release-ready
> @@ -196,20 +196,20 @@ class VerifyReleaseReady():
>          # Construct the expected tag, and verify that it matches the
>          # latest commit tag
>          #
> -        config = ConfigParser.RawConfigParser()

ConfigParser is not used anymore in this file, so we can also remove the
import.

> -        if config.read('debian/gbp.conf'):
> -            expect_tag_format = config.get('buildpackage', 'debian-tag')
> -            v = version
> +
> +        if 'linux-lts-' in cl1['package']:
>              # Starting with trusty, the lts backports closing commit and the tag
>              # contain '~<series_version>' (e.g. '~14.04.1')
> -            if 'linux-lts-' in cl1['package']:
> -                v = cl1['version']
> -            expect_tag = expect_tag_format % {'version' : v}
> -            s.verify_tag(log, expect_tag)
> +            tag_prefix = 'Ubuntu-lts'
> +            v = cl1['version']

The  -hwe and -hwe-edge packages also follow the same pattern, adding
the series to the package version. So we should also handle them here.

> +        elif cl1['package'] != 'linux':
> +            tag_prefix = 'Ubuntu-' + cl1['package'].replace('linux-', '')
> +            v = version
>          else:
> -            s.status('missing debian/gbp.conf', 'warning')
> -            if closed:
> -                s.verify_tag(log, expected_re)
> +            tag_prefix = 'Ubuntu'
> +            v = version
> +        expect_tag = tag_prefix + "-" + v
> +        s.verify_tag(log, expect_tag)
>  
>          # Look to see if a tracking bug has been added to the changelog
>          #
>
diff mbox

Patch

diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index bff3dd65..485a972c 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -196,20 +196,20 @@  class VerifyReleaseReady():
         # Construct the expected tag, and verify that it matches the
         # latest commit tag
         #
-        config = ConfigParser.RawConfigParser()
-        if config.read('debian/gbp.conf'):
-            expect_tag_format = config.get('buildpackage', 'debian-tag')
-            v = version
+
+        if 'linux-lts-' in cl1['package']:
             # Starting with trusty, the lts backports closing commit and the tag
             # contain '~<series_version>' (e.g. '~14.04.1')
-            if 'linux-lts-' in cl1['package']:
-                v = cl1['version']
-            expect_tag = expect_tag_format % {'version' : v}
-            s.verify_tag(log, expect_tag)
+            tag_prefix = 'Ubuntu-lts'
+            v = cl1['version']
+        elif cl1['package'] != 'linux':
+            tag_prefix = 'Ubuntu-' + cl1['package'].replace('linux-', '')
+            v = version
         else:
-            s.status('missing debian/gbp.conf', 'warning')
-            if closed:
-                s.verify_tag(log, expected_re)
+            tag_prefix = 'Ubuntu'
+            v = version
+        expect_tag = tag_prefix + "-" + v
+        s.verify_tag(log, expect_tag)
 
         # Look to see if a tracking bug has been added to the changelog
         #