diff --git a/debian/changelog b/debian/changelog index 41eea76..c05824f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Mon, 03 May 2010 23:25:15 +0100 ubuntu-dev-tools (0.99) lucid; urgency=low diff --git a/requestsync b/requestsync index 877d65c..3474f48 100755 --- a/requestsync +++ b/requestsync @@ -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