backportpackage: Add a -e/--message option to change the default "No-change" in "No-change backport to DIST".

Thanks to Unit 193 for the initial patch.

Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Mattia Rizzolo 2021-01-14 15:03:28 +01:00
parent a75fb35fc8
commit d3a7eac62f
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
2 changed files with 13 additions and 3 deletions

View File

@ -86,6 +86,11 @@ def parse(args):
metavar='SUFFIX',
help='Suffix to append to version number '
'(default: ~ppa1 when uploading to a PPA)')
parser.add_option('-e', '--message',
metavar='MESSAGE',
default="No-change",
help='Changelog message to use instead of "No-change" '
'(default: No-change backport to DEST)')
parser.add_option('-b', '--build',
default=False,
action='store_true',
@ -312,8 +317,8 @@ def orig_needed(upload, workdir, pkg):
return False
def do_backport(workdir, pkg, suffix, close, release, release_pocket, build,
builder, update, upload, keyid, prompt):
def do_backport(workdir, pkg, suffix, message, close, release, release_pocket,
build, builder, update, upload, keyid, prompt):
dirname = '%s-%s' % (pkg.source, release)
srcdir = os.path.join(workdir, dirname)
@ -330,7 +335,7 @@ def do_backport(workdir, pkg, suffix, close, release, release_pocket, build,
old_version = get_old_version(pkg.source, release)
bp_dist = get_backport_dist(release, release_pocket)
changelog = 'No-change backport to %s' % (release,)
changelog = '%s backport to %s' % (message, release,)
if close:
changelog += ' (LP: #%s)' % (close,)
check_call(['dch',
@ -410,6 +415,7 @@ def main(args):
do_backport(workdir,
pkg,
opts.suffix,
opts.message,
opts.close,
release,
opts.release_pocket,

4
debian/changelog vendored
View File

@ -6,6 +6,10 @@ ubuntu-dev-tools (0.178) UNRELEASED; urgency=medium
[ Mattia Rizzolo ]
* d/control: Bump Standards-Version to 4.5.1, no changes needed.
* ubuntu-archive-assistant/mir: Fix a SyntaxWarning.
* backportpackage:
+ Add a -e/--message option to change the default "No-change"
in "No-change backport to DIST".
Thanks to Unit 193 for the initial patch.
[ You-Sheng Yang ]
* Add a dependency on tzdata, used by mk-sbuild.