diff -Nru ubuntu-dev-tools-0.141/debian/changelog ubuntu-dev-tools-0.141ubuntu0.1/debian/changelog --- ubuntu-dev-tools-0.141/debian/changelog 2012-04-12 21:46:24.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/debian/changelog 2012-11-07 21:31:52.000000000 +0000 @@ -1,3 +1,19 @@ +ubuntu-dev-tools (0.141ubuntu0.1) precise-proposed; urgency=low + + * Cherry-pick some bug fixes from 0.142-0.145: + - syncpackage: Default to -proposed. + - syncpackage, requestsync: Check the Release pocket if we can't find an + Ubuntu package in the requested pocket. (LP: #1069867) + - pull-lp-source: Catch errors parsing JSON we got from DDE (LP: #1059848) + - sponsor-patch: Don't fall over bugs targeted at the development release + (LP: #936014) + - requestsync: We now sync to proposed (LP: #1073060) + - syncpackage: syncpackage: Don't throw away release pockets, returning + correct errors when the source and destination match even though the + destination release pocket doesn't. + + -- Stefano Rivera Wed, 07 Nov 2012 23:24:56 +0200 + ubuntu-dev-tools (0.141) unstable; urgency=low * syncpackage: Log into Launchpad anonymously with --no-lp diff -Nru ubuntu-dev-tools-0.141/pull-lp-source ubuntu-dev-tools-0.141ubuntu0.1/pull-lp-source --- ubuntu-dev-tools-0.141/pull-lp-source 2012-01-22 18:58:07.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/pull-lp-source 2012-11-07 21:32:23.000000000 +0000 @@ -47,12 +47,15 @@ """ url = ('http://dde.debian.net/dde/q/udd/dist/d:ubuntu/r:%s/p:%s/?t=json' % (release, binary)) + data = None try: data = json.load(urllib2.urlopen(url))['r'] except urllib2.URLError, e: Logger.error('Unable to retrieve package information from DDE: ' '%s (%s)', url, str(e)) - return None + except ValueError, e: + Logger.error('Unable to parse JSON response from DDE: ' + '%s (%s)', url, str(e)) if not data: return None return data[0]['source'] diff -Nru ubuntu-dev-tools-0.141/requestbackport ubuntu-dev-tools-0.141ubuntu0.1/requestbackport --- ubuntu-dev-tools-0.141/requestbackport 2012-01-22 18:58:07.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/requestbackport 2012-11-07 21:32:23.000000000 +0000 @@ -74,6 +74,16 @@ return destinations +def disclaimer(): + print ("Ubuntu's backports are not for fixing bugs in stable releases, " + "but for bringing new features to older, stable releases.") + print ("See https://wiki.ubuntu.com/UbuntuBackports for the Ubuntu " + "Backports policy and processes.") + print ("See https://wiki.ubuntu.com/StableReleaseUpdates for the process " + "for fixing bugs in stable releases.") + confirmation_prompt() + + def check_existing(package, destinations): """Search for possible existing bug reports""" # The LP bug search is indexed, not substring: @@ -284,6 +294,8 @@ Logger.error(str(e)) sys.exit(1) + disclaimer() + check_existing(package, destinations) package_spph = locate_package(package, options.source) diff -Nru ubuntu-dev-tools-0.141/requestsync ubuntu-dev-tools-0.141ubuntu0.1/requestsync --- ubuntu-dev-tools-0.141/requestsync 2012-03-28 21:50:57.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/requestsync 2012-11-07 21:32:23.000000000 +0000 @@ -203,7 +203,7 @@ # Get the current Ubuntu source package try: - ubuntu_srcpkg = get_ubuntu_srcpkg(srcpkg, release) + ubuntu_srcpkg = get_ubuntu_srcpkg(srcpkg, release, 'Proposed') ubuntu_version = Version(ubuntu_srcpkg.getVersion()) ubuntu_component = ubuntu_srcpkg.getComponent() newsource = False # override the -n flag diff -Nru ubuntu-dev-tools-0.141/syncpackage ubuntu-dev-tools-0.141ubuntu0.1/syncpackage --- ubuntu-dev-tools-0.141/syncpackage 2012-04-12 16:27:52.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/syncpackage 2012-11-07 21:32:23.000000000 +0000 @@ -134,8 +134,9 @@ new_ver = Version(src_pkg.dsc["Version"]) try: - series = release.split("-")[0] - ubuntu_source = get_ubuntu_srcpkg(src_pkg.source, series) + ubuntu_series, ubuntu_pocket = split_release_pocket(release) + ubuntu_source = get_ubuntu_srcpkg(src_pkg.source, ubuntu_series, + ubuntu_pocket) ubuntu_ver = Version(ubuntu_source.getVersion()) ubu_pkg = UbuntuSourcePackage(src_pkg.source, ubuntu_ver.full_version, ubuntu_source.getComponent(), @@ -309,7 +310,9 @@ if version is None: version = Version(debian_srcpkg.getVersion()) try: - ubuntu_srcpkg = get_ubuntu_srcpkg(package, ubuntu_release) + ubuntu_series, ubuntu_pocket = split_release_pocket(ubuntu_release) + ubuntu_srcpkg = get_ubuntu_srcpkg(package, ubuntu_series, + ubuntu_pocket) ubuntu_version = Version(ubuntu_srcpkg.getVersion()) except udtexceptions.PackageNotFoundException: ubuntu_version = Version('~') @@ -647,7 +650,7 @@ if options.release is None: ubuntu = Launchpad.distributions["ubuntu"] - options.release = ubuntu.current_series.name + options.release = "%s-proposed" % ubuntu.current_series.name if not options.fakesync and not options.lp: Logger.warn("The use of --no-lp is not recommended for uploads " @@ -684,7 +687,7 @@ src_pkg = fetch_source_pkg(package, options.distribution, options.debian_version, options.component, - options.release.split("-")[0], + options.release, options.debian_mirror) blacklisted, comments = is_blacklisted(src_pkg.source) diff -Nru ubuntu-dev-tools-0.141/ubuntutools/requestsync/lp.py ubuntu-dev-tools-0.141ubuntu0.1/ubuntutools/requestsync/lp.py --- ubuntu-dev-tools-0.141/ubuntutools/requestsync/lp.py 2012-01-22 18:58:07.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/ubuntutools/requestsync/lp.py 2012-11-07 21:32:23.000000000 +0000 @@ -27,10 +27,12 @@ from distro_info import DebianDistroInfo from httplib2 import Http, HttpLib2Error +from ubuntutools.lp import udtexceptions from ubuntutools.lp.lpapicache import (Launchpad, Distribution, PersonTeam, DistributionSourcePackage) from ubuntutools.question import confirmation_prompt + def get_debian_srcpkg(name, release): debian = Distribution('debian') debian_archive = debian.getArchive() @@ -39,11 +41,21 @@ return debian_archive.getSourcePackage(name, release) + def get_ubuntu_srcpkg(name, release, pocket='Release'): ubuntu = Distribution('ubuntu') ubuntu_archive = ubuntu.getArchive() - return ubuntu_archive.getSourcePackage(name, release, pocket) + try: + return ubuntu_archive.getSourcePackage(name, release, pocket) + except udtexceptions.PackageNotFoundException: + if pocket != 'Release': + parent_pocket = 'Release' + if pocket == 'Updates': + parent_pocket = 'Proposed' + return get_ubuntu_srcpkg(name, release, parent_pocket) + raise + def need_sponsorship(name, component, release): ''' diff -Nru ubuntu-dev-tools-0.141/ubuntutools/sponsor_patch/sponsor_patch.py ubuntu-dev-tools-0.141ubuntu0.1/ubuntutools/sponsor_patch/sponsor_patch.py --- ubuntu-dev-tools-0.141/ubuntutools/sponsor_patch/sponsor_patch.py 2012-02-15 14:20:30.000000000 +0000 +++ ubuntu-dev-tools-0.141ubuntu0.1/ubuntutools/sponsor_patch/sponsor_patch.py 2012-11-07 21:32:23.000000000 +0000 @@ -201,6 +201,9 @@ tasks = [task for task in ubuntu_tasks if task.get_series() == branch[2] and task.package == branch[3]] + if len(tasks) > 1: + # A bug targetted to the development series? + tasks = [task for task in tasks if task.series is not None] assert len(tasks) == 1 task = tasks[0] elif len(ubuntu_tasks) > 1: