mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-09 16:01:28 +00:00
backportpackage: fix automatic selection of the target release.
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
3ef7c4a569
commit
7fc6788b35
@ -29,7 +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 distro_info import DebianDistroInfo, UbuntuDistroInfo
|
||||||
|
|
||||||
from ubuntutools.archive import (DebianSourcePackage,
|
from ubuntutools.archive import (DebianSourcePackage,
|
||||||
UbuntuSourcePackage, DownloadError)
|
UbuntuSourcePackage, DownloadError)
|
||||||
@ -398,9 +398,15 @@ def main(args):
|
|||||||
if not opts.dest_releases:
|
if not opts.dest_releases:
|
||||||
distinfo = lsb_release.get_distro_information()
|
distinfo = lsb_release.get_distro_information()
|
||||||
try:
|
try:
|
||||||
opts.dest_releases = [distinfo['CODENAME']]
|
current_distro = distinfo['ID']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
error('No destination release specified and unable to guess yours.')
|
error('No destination release specified and unable to guess yours.')
|
||||||
|
if current_distro == "Ubuntu":
|
||||||
|
opts.dest_releases = [UbuntuDistroInfo().lts()]
|
||||||
|
if current_distro == "Debian":
|
||||||
|
opts.dest_releases = [DebianDistroInfo().stable()]
|
||||||
|
else:
|
||||||
|
error(f"Unknown distribution {current_distro}, can't guess target release")
|
||||||
|
|
||||||
if opts.workdir:
|
if opts.workdir:
|
||||||
workdir = os.path.expanduser(opts.workdir)
|
workdir = os.path.expanduser(opts.workdir)
|
||||||
|
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -10,6 +10,9 @@ ubuntu-dev-tools (0.187) UNRELEASED; urgency=medium
|
|||||||
Closes: #968316
|
Closes: #968316
|
||||||
* backportpackage:
|
* backportpackage:
|
||||||
+ Support backporting to Debian releases. LP: #974132
|
+ Support backporting to Debian releases. LP: #974132
|
||||||
|
+ Fix the guessing algorithm for the target release:
|
||||||
|
- for Debian: pick the current stable release.
|
||||||
|
- for Ubuntu: pick the current LTS release.
|
||||||
|
|
||||||
[ Unit 193 ]
|
[ Unit 193 ]
|
||||||
* backportpackage:
|
* backportpackage:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user