From a93078cb3273e795db754299acc816115eacc774 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 5 Mar 2011 00:05:04 +0200 Subject: [PATCH] ubuntutools.archive: Filter rmadison results. (LP: #710579) --- debian/changelog | 3 +++ ubuntutools/archive.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2eeed06..d0354bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ ubuntu-dev-tools (0.120) UNRELEASED; urgency=low [ Felix Geyer ] * pull-lp-source.1: Document -d option. + [ Stefano Rivera ] + * ubuntutools.archive: Filter rmadison results. (LP: #710579) + -- Stefano Rivera Wed, 02 Mar 2011 12:34:04 +0200 ubuntu-dev-tools (0.119) unstable; urgency=low diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index 6be9c0b..6b95b21 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -526,6 +526,13 @@ def rmadison(url, package, suite=None, arch=None): if '/' in dist: dist, comp = dist.split('/') archs = set(x.strip() for x in archs.split(',')) + + # rmadison returns some results outside the requested set. + # It'll include backports, and when given an unknown suite, + # it ignores that argument + if dist != suite: + continue + if 'source' in archs: yield { 'source': pkg,