[kteam-tools][PATCH] verify-release-ready: do not rely on debian/gbp.conf for tag name
Kleber Sacilotto de Souza
kleber.souza at canonical.com
Wed Aug 16 14:27:04 UTC 2017
We currently rely on 'debian-tag' config from debian/gbp.conf, however
this value is not set correctly for all derivatives and backports.
Derive the tag name from the package name and version extracted from the
changelog instead.
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
---
maintscripts/verify-release-ready | 33 +++++++++++----------------------
1 file changed, 11 insertions(+), 22 deletions(-)
diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index 928fb544..3a4ccfd1 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -12,7 +12,6 @@ from ktl.ubuntu import Ubuntu
from ktl.termcolor import colored
from launchpadlib.launchpad import Launchpad
import re
-import ConfigParser
# AppError
#
@@ -196,28 +195,18 @@ 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')
-
- # juergh: Derivatives have a different tag format, e.g., Ubuntu-raspi2-<version>
- pkg = cl1['package']
- if pkg.startswith('linux-') and not pkg.startswith('linux-lts-'):
- deriv = pkg[6:] # strip 'linux-'
- expect_tag_format = expect_tag_format.replace('%(version)',
- deriv + '-%(version)')
-
- v = version
- # 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)
+ pkg = cl1['package']
+ if pkg.startswith('linux-lts'):
+ tag_prefix = 'Ubuntu-lts'
+ v = cl1['version']
+ elif pkg.startswith('linux-hwe'):
+ tag_prefix = 'Ubuntu-hwe'
+ v = cl1['version']
else:
- s.status('missing debian/gbp.conf', 'warning')
- if closed:
- s.verify_tag(log, expected_re)
+ tag_prefix = pkg.replace('linux', 'Ubuntu')
+ v = version
+ expect_tag = "%s-%s" % (tag_prefix, v.replace('~', '_'))
+ s.verify_tag(log, expect_tag)
# Look to see if a tracking bug has been added to the changelog
#
--
2.14.0
More information about the kernel-team
mailing list