From 12c86a8fda318188b96172fb1c792f0a9aa30c5e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 22 Oct 2015 10:00:21 -0400 Subject: [PATCH] ubuntutools/archive.py/rmadison: return results for sid if asked about unstable Some versions of rmadison return results with 'unstable' when asked about sid. Others return 'sid'. This makes a query of 'unstable' return results for sid. End result is fixing 'pull-debian-source hello' on wily. --- ubuntutools/archive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index 46d4c51..72e766c 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -636,7 +636,11 @@ def rmadison(url, package, suite=None, arch=None): # rmadison returns some results outside the requested set. # It'll include backports, and when given an unknown suite, # it ignores that argument - if suite and dist != suite: + # + # some versions (2.14.1ubuntu0.1) of rmadison return 'sid' when + # asked about 'unstable'. Others return 'unstable'. Accept either. + if (suite and dist != suite and not + (suite == 'sid' and dist == 'unstable')): continue if 'source' in archs: