mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-08 15:31:29 +00:00
backportpackage: Support backporting to Debian releases. LP: #974132
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
74867c90f4
commit
a74a49fb81
@ -29,6 +29,7 @@ from urllib.parse import quote
|
|||||||
|
|
||||||
import lsb_release
|
import lsb_release
|
||||||
from httplib2 import Http, HttpLib2Error
|
from httplib2 import Http, HttpLib2Error
|
||||||
|
from distro_info import DebianDistroInfo
|
||||||
|
|
||||||
from ubuntutools.archive import (DebianSourcePackage,
|
from ubuntutools.archive import (DebianSourcePackage,
|
||||||
UbuntuSourcePackage, DownloadError)
|
UbuntuSourcePackage, DownloadError)
|
||||||
@ -225,10 +226,19 @@ def get_backport_version(version, suffix, upload, release):
|
|||||||
distribution = codename_to_distribution(release)
|
distribution = codename_to_distribution(release)
|
||||||
if not distribution:
|
if not distribution:
|
||||||
error('Unknown release codename %s' % release)
|
error('Unknown release codename %s' % release)
|
||||||
|
if distribution == 'Debian':
|
||||||
|
supported = DebianDistroInfo().supported()
|
||||||
|
if release not in supported:
|
||||||
|
error('%s is not supported (%s)' % (release, supported))
|
||||||
|
release_version = DebianDistroInfo.version(release)
|
||||||
|
backport_version = version + '~bpo%s+1' % release_version
|
||||||
|
elif distribution == 'Ubuntu':
|
||||||
series = Distribution(distribution.lower()).\
|
series = Distribution(distribution.lower()).\
|
||||||
getSeries(name_or_version=release)
|
getSeries(name_or_version=release)
|
||||||
|
|
||||||
backport_version = version + ('~%s%s.1' % (distribution.lower(), series.version))
|
backport_version = version + ('~%s%s.1' % (distribution.lower(), series.version))
|
||||||
|
else:
|
||||||
|
error('Unknown distribution «%s» for release «%s»' % (distribution, release))
|
||||||
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:'):
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -8,6 +8,8 @@ ubuntu-dev-tools (0.187) UNRELEASED; urgency=medium
|
|||||||
* mk-sbuild:
|
* mk-sbuild:
|
||||||
+ Apply patch from Peter Pentchev to avoid a broken log message.
|
+ Apply patch from Peter Pentchev to avoid a broken log message.
|
||||||
Closes: #968316
|
Closes: #968316
|
||||||
|
* backportpackage:
|
||||||
|
+ Support backporting to Debian releases. LP: #974132
|
||||||
|
|
||||||
-- Mattia Rizzolo <mattia@debian.org> Sun, 31 Oct 2021 16:24:56 +0100
|
-- Mattia Rizzolo <mattia@debian.org> Sun, 31 Oct 2021 16:24:56 +0100
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user