requestsync: Fall back to using rmadison when LP indicates that no new

version is available. The LP importer is often out of date wrt Debian when
rmadison isn't. (LP: #574398)
This commit is contained in:
Iain Lane 2010-05-03 23:28:00 +01:00
parent 9e23dfa60c
commit 22274ef8aa
2 changed files with 20 additions and 1 deletions

7
debian/changelog vendored
View File

@ -9,7 +9,12 @@ ubuntu-dev-tools (0.100) UNRELEASED; urgency=low
* reverse-build-depends: Always display the correct default distribution
name in the usage text.
-- Michael Bienia <geser@ubuntu.com> Sun, 02 May 2010 18:33:59 +0200
[ Iain Lane ]
* requestsync: Fall back to using rmadison when LP indicates that no new
version is available. The LP importer is often out of date wrt Debian when
rmadison isn't. (LP: #574398)
-- Iain Lane <laney@ubuntu.com> Mon, 03 May 2010 23:25:15 +0100
ubuntu-dev-tools (0.99) lucid; urgency=low

View File

@ -80,6 +80,9 @@ if __name__ == '__main__':
from ubuntutools.requestsync.lp import *
from ubuntutools.lp.lpapicache import Distribution
# See if we have LP credentials and exit if we don't - cannot continue in this case
hasLP = True
try:
Launchpad.login()
except IOError:
@ -140,6 +143,17 @@ if __name__ == '__main__':
sys.exit(1)
# Stop if Ubuntu has already the version from Debian or a newer version
if (ubuntu_version == debian_version) and hasLP:
# try rmadison
import ubuntutools.requestsync.mail
try:
debian_srcpkg = ubuntutools.requestsync.mail.getDebianSrcPkg(srcpkg, distro)
debian_version = Version(debian_srcpkg.getVersion())
debian_component = debian_srcpkg.getComponent()
except udtexceptions.PackageNotFoundException, e:
print >> sys.stderr, "E: %s" % e
sys.exit(1)
if ubuntu_version == debian_version:
print >> sys.stderr, \
'E: The versions in Debian and Ubuntu are the same already (%s). Aborting.' % ubuntu_version