backportpackage: Switch to ~ubuntu12.04.1-style version numbers

instead of ~precise1, to make our version numbers more future-proof.
This commit is contained in:
Evan Broder 2012-05-13 13:49:49 -07:00
parent 4f66ed834b
commit 3136efc10d
3 changed files with 12 additions and 4 deletions

View File

@ -204,7 +204,13 @@ def find_package(mirror, workdir, package, version, source_release, config):
return srcpkg return srcpkg
def get_backport_version(version, suffix, upload, release): 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: if suffix is not None:
backport_version += suffix backport_version += suffix
elif upload and upload.startswith('ppa:'): elif upload and upload.startswith('ppa:'):

4
debian/changelog vendored
View File

@ -26,8 +26,10 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
[ Evan Broder ] [ Evan Broder ]
* backportpackage: Add -c, --close flag to include a changelog closer. * 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 <evan@ebroder.net> Fri, 11 May 2012 09:54:01 -0700 -- Evan Broder <evan@ebroder.net> Sun, 13 May 2012 13:49:35 -0700
ubuntu-dev-tools (0.141) unstable; urgency=low ubuntu-dev-tools (0.141) unstable; urgency=low

View File

@ -39,10 +39,10 @@ development release for your distribution.
.B \-S \fISUFFIX\fR, \fB\-\-suffix\fR=\fISUFFIX\fR .B \-S \fISUFFIX\fR, \fB\-\-suffix\fR=\fISUFFIX\fR
Add the specified suffix to the version number when Add the specified suffix to the version number when
backporting. \fBbackportpackage\fR will always append 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 \fISUFFIX\fR is specified, it is appended to that, to get version
numbers of the form 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 backported package is being uploaded to a PPA, then \fISUFFIX\fR
defaults to \fB~ppa1\fR, otherwise the default is blank. defaults to \fB~ppa1\fR, otherwise the default is blank.
.TP .TP