mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
Canonicalise suites (use code-names) before passing them to rmadison.
This commit is contained in:
parent
36b422605b
commit
989aecd253
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -5,6 +5,7 @@ ubuntu-dev-tools (0.120) UNRELEASED; urgency=low
|
|||||||
|
|
||||||
[ Stefano Rivera ]
|
[ Stefano Rivera ]
|
||||||
* ubuntutools.archive: Filter rmadison results. (LP: #710579)
|
* ubuntutools.archive: Filter rmadison results. (LP: #710579)
|
||||||
|
- Canonicalise suites (use code-names) before passing them to rmadison.
|
||||||
* pull-{lp,debian}-source: Download requested versions, as well as simply
|
* pull-{lp,debian}-source: Download requested versions, as well as simply
|
||||||
the latest version in a release.
|
the latest version in a release.
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ def main():
|
|||||||
component = None
|
component = None
|
||||||
|
|
||||||
debian_info = DebianDistroInfo()
|
debian_info = DebianDistroInfo()
|
||||||
if version in debian_info.all or debian_info.codename(version) is not None:
|
if debian_info.codename(version, default=version) in debian_info.all:
|
||||||
suite = version
|
suite = debian_info.codename(version, default=version)
|
||||||
line = list(rmadison('debian', package, suite, 'source'))
|
line = list(rmadison('debian', package, suite, 'source'))
|
||||||
if not line:
|
if not line:
|
||||||
Logger.error('Unable to find %s in Debian suite "%s".', package,
|
Logger.error('Unable to find %s in Debian suite "%s".', package,
|
||||||
|
@ -27,6 +27,7 @@ import smtplib
|
|||||||
import socket
|
import socket
|
||||||
from debian.changelog import Version
|
from debian.changelog import Version
|
||||||
from ubuntutools.archive import rmadison, FakeSPPH
|
from ubuntutools.archive import rmadison, FakeSPPH
|
||||||
|
from ubuntutools.distro_info import DebianDistroInfo
|
||||||
from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc
|
from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc
|
||||||
from ubuntutools.lp.udtexceptions import PackageNotFoundException
|
from ubuntutools.lp.udtexceptions import PackageNotFoundException
|
||||||
|
|
||||||
@ -39,6 +40,11 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
def getSrcPkg(distro, name, release):
|
def getSrcPkg(distro, name, release):
|
||||||
|
if distro == 'debian':
|
||||||
|
# Canonicalise release:
|
||||||
|
debian_info = DebianDistroInfo()
|
||||||
|
release = debian_info.codename(release, default=release)
|
||||||
|
|
||||||
lines = list(rmadison(distro, name, suite=release, arch='source'))
|
lines = list(rmadison(distro, name, suite=release, arch='source'))
|
||||||
if not lines:
|
if not lines:
|
||||||
raise PackageNotFoundException("'%s' doesn't appear to exist "
|
raise PackageNotFoundException("'%s' doesn't appear to exist "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user