diff --git a/backportpackage b/backportpackage index de24221..37f6396 100755 --- a/backportpackage +++ b/backportpackage @@ -102,6 +102,9 @@ def parse(args): action='store_true', help='Target the release pocket in the .changes file. ' 'Necessary (and default) for uploads to PPAs') + parser.add_option('-c', '--close', + metavar='BUG', + help='Bug to close in the changelog entry.') parser.add_option('-m', '--mirror', metavar='INSTANCE', help='Preferred mirror (default: Launchpad)') @@ -232,8 +235,8 @@ def do_upload(workdir, package, bp_version, changes, upload, prompt): check_call(['dput', upload, changes], cwd=workdir) -def do_backport(workdir, pkg, suffix, release, release_pocket, build, builder, - update, upload, prompt): +def do_backport(workdir, pkg, suffix, close, release, release_pocket, build, + builder, update, upload, prompt): dirname = '%s-%s' % (pkg.source, release) srcdir = os.path.join(workdir, dirname) @@ -249,13 +252,16 @@ def do_backport(workdir, pkg, suffix, release, release_pocket, build, builder, upload, release) bp_dist = get_backport_dist(release, release_pocket) + changelog = 'No-change backport to %s' % (release,) + if close: + changelog += ' (LP: #%s)' % (close,) check_call(['dch', '--force-bad-version', '--force-distribution', '--preserve', '--newversion', bp_version, '--distribution', bp_dist, - 'No-change backport to %s' % release], + changelog], cwd=srcdir) check_call(['debuild', '--no-lintian', '-S', '-nc', '-sa'], cwd=srcdir) @@ -305,6 +311,7 @@ def main(args): do_backport(workdir, pkg, opts.suffix, + opts.close, release, opts.release_pocket, opts.build, diff --git a/debian/changelog b/debian/changelog index 6d209e0..fe3261a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low + [ Stefano Rivera ] * mk-sbuild: Support kmod, when checking for overlayfs availability. * pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten Bezemer. (Closes: #670924, LP: #770529) - -- Stefano Rivera Wed, 25 Apr 2012 17:38:58 +0200 + [ Evan Broder ] + * backportpackage: Add -c, --close flag to include a changelog closer. + + -- Evan Broder Fri, 11 May 2012 09:54:01 -0700 ubuntu-dev-tools (0.141) unstable; urgency=low diff --git a/doc/backportpackage.1 b/doc/backportpackage.1 index 8bd2bcc..721e2ed 100644 --- a/doc/backportpackage.1 +++ b/doc/backportpackage.1 @@ -97,6 +97,11 @@ Should be in the form \fBhttp://archive.ubuntu.com/ubuntu\fR. If the package isn't found on this mirror, \fBbackportpackage\fR will use Launchpad. .TP +.B \-c \fIBUG\fR, \fB\-\-close\fR=\fIBUG\fR +Include a Launchpad closer for the specified bug in the auto-generated +changelog. In the future, this may actually close the bug, but +currently does not. +.TP .B \-l \fIINSTANCE\fR, \fB\-\-lpinstance\fR=\fIINSTANCE\fR Use the specified instance of Launchpad (e.g. "staging"), instead of the default of "production".