mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +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 ]
|
||||
* 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
|
||||
the latest version in a release.
|
||||
|
||||
|
@ -60,8 +60,8 @@ def main():
|
||||
component = None
|
||||
|
||||
debian_info = DebianDistroInfo()
|
||||
if version in debian_info.all or debian_info.codename(version) is not None:
|
||||
suite = version
|
||||
if debian_info.codename(version, default=version) in debian_info.all:
|
||||
suite = debian_info.codename(version, default=version)
|
||||
line = list(rmadison('debian', package, suite, 'source'))
|
||||
if not line:
|
||||
Logger.error('Unable to find %s in Debian suite "%s".', package,
|
||||
|
@ -27,6 +27,7 @@ import smtplib
|
||||
import socket
|
||||
from debian.changelog import Version
|
||||
from ubuntutools.archive import rmadison, FakeSPPH
|
||||
from ubuntutools.distro_info import DebianDistroInfo
|
||||
from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc
|
||||
from ubuntutools.lp.udtexceptions import PackageNotFoundException
|
||||
|
||||
@ -39,6 +40,11 @@ __all__ = [
|
||||
]
|
||||
|
||||
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'))
|
||||
if not lines:
|
||||
raise PackageNotFoundException("'%s' doesn't appear to exist "
|
||||
|
Loading…
x
Reference in New Issue
Block a user