diff --git a/backportpackage b/backportpackage index 2ff056b..d658fa5 100755 --- a/backportpackage +++ b/backportpackage @@ -204,7 +204,13 @@ def find_package(mirror, workdir, package, version, source_release, config): return srcpkg def get_backport_version(version, suffix, upload, release): - backport_version = version + ('~%s1' % release) + distribution = codename_to_distribution(release) + if not distribution: + error('Unknown release codename %s' % release) + series = Distribution(distribution.lower()).\ + getSeries(name_or_version=release) + + backport_version = version + ('~%s%s.1' % (distribution.lower(), series.version)) if suffix is not None: backport_version += suffix elif upload and upload.startswith('ppa:'): diff --git a/debian/changelog b/debian/changelog index 4b90ee6..f85a78f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,8 +26,10 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low [ Evan Broder ] * backportpackage: Add -c, --close flag to include a changelog closer. + * backportpackage: Switch to ~ubuntu12.04.1-style version numbers + instead of ~precise1, to make our version numbers more future-proof. - -- Evan Broder Fri, 11 May 2012 09:54:01 -0700 + -- Evan Broder Sun, 13 May 2012 13:49:35 -0700 ubuntu-dev-tools (0.141) unstable; urgency=low diff --git a/doc/backportpackage.1 b/doc/backportpackage.1 index 721e2ed..b85f310 100644 --- a/doc/backportpackage.1 +++ b/doc/backportpackage.1 @@ -39,10 +39,10 @@ development release for your distribution. .B \-S \fISUFFIX\fR, \fB\-\-suffix\fR=\fISUFFIX\fR Add the specified suffix to the version number when backporting. \fBbackportpackage\fR will always append -~\fIDESTINATION\fR1 to the original version number, and if +~ubuntu\fIDESTINATION\fR.1 to the original version number, and if \fISUFFIX\fR is specified, it is appended to that, to get version numbers of the form -\fIORIGINAL_VERSION\fR~\fIDESTINATION\fR1\fISUFFIX\fR. If the +\fIORIGINAL_VERSION\fR~ubuntu\fIDESTINATION\fR.1\fISUFFIX\fR. If the backported package is being uploaded to a PPA, then \fISUFFIX\fR defaults to \fB~ppa1\fR, otherwise the default is blank. .TP