Merge lp:~talex5/ubuntu/precise/zeroinstall-injector/fix-for-953756 into lp:ubuntu/precise/zeroinstall-injector

Proposed by Thomas Leonard
Status: Merged
Merged at revision: 33
Proposed branch: lp:~talex5/ubuntu/precise/zeroinstall-injector/fix-for-953756
Merge into: lp:ubuntu/precise/zeroinstall-injector
Diff against target: 87 lines (+69/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/packagekit-api.patch (+62/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~talex5/ubuntu/precise/zeroinstall-injector/fix-for-953756
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
James Page Needs Fixing
Ubuntu branches Pending
Review via email: mp+97807@code.launchpad.net

Description of the change

Fixes an incompatibility with the aptdaemon PackageKit implementation in precise.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Hi Thomas

Thanks for taking the time to prepare this fix.

Some feedback:

1) debian/changelog.

You don't need to reference the full URL to the bug report: (LP: #953756) is sufficient and will trigger the bug to auto-close when the update is uploaded.

Also the version number should have a ubuntu suffix;

1.4.1-2 -> 1.4.1-1ubuntu1

2) debian/patches/packagekit-api.patch

The patch has some generated information in it still (this should be dropped); it would be great if this fix was forwarded upstream as well and the generated bug reference in a Forwarded: field as described in the generated information. Or if it came from upstream document this using appropriate fields.

I notice that Debian now has version 1.6 - would this resolve this bug? Might make more sense to re-sync if its not to invasive and upgrade.

Cheers

James

review: Needs Fixing
Revision history for this message
Thomas Leonard (talex5) wrote :

Thanks. 1.6 wouldn't fix it, although it would be good to sync anyway if possible as there's a certificate validation fix in there. If you sync it, I'll upload a new patch against 1.6.

The upstream fixes are:

http://repo.or.cz/w/zeroinstall.git/commitdiff/3f93170a7d12887c8795b4a0a6376b2482d2cfe3

http://repo.or.cz/w/zeroinstall.git/commitdiff/9b466b9b5fab731a9eaa565627cf3b2bea713153

Revision history for this message
Daniel Holbach (dholbach) wrote :

For the sync, please file a bug against the package with all necessary information about the update and subscribe the 'ubuntu-release' team to get an ACK of the release team.

33. By Thomas Leonard

Fixed API incompatibility with PackageKit's InstallPackages (LP: #953756).

Revision history for this message
Thomas Leonard (talex5) wrote :

OK, I've pushed a new patch, against the new 1.6 package:

* The changelog is now in the correct format
* The version has an ubuntu suffix
* The patch has the auto-generated comments removed
* The patch references the upstream fix

There is a build of it in my PPA (except I had to change the version number to ubuntu2 there because I messed up the first upload and couldn't work out how to overwrite it):

https://launchpad.net/~talex5/+archive/0install/+packages

Thanks,

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks good to me; with the only thing that you should run update-maintainer since this goes with Ubuntu changes. I've done so myself while merging this.

Upstream fix is reasonable and you're the upstream developer anyway, changes tested and verified to be working. I could match the other changes to the immediate next upstream commit in git.

Approved; I'll upload to the queue shortly (though it will wait there until post-freeze).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-12 15:19:54 +0000
3+++ debian/changelog 2012-03-26 18:48:19 +0000
4@@ -1,3 +1,9 @@
5+zeroinstall-injector (1.6-1ubuntu1) precise; urgency=low
6+
7+ * Fixed API incompatibility with PackageKit's InstallPackages (LP: #953756).
8+
9+ -- Thomas Leonard <talex5@gmail.com> Fri, 16 Mar 2012 07:15:46 +0000
10+
11 zeroinstall-injector (1.6-1) unstable; urgency=low
12
13 * New upstream release.
14
15=== added directory 'debian/patches'
16=== added file 'debian/patches/packagekit-api.patch'
17--- debian/patches/packagekit-api.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/packagekit-api.patch 2012-03-26 18:48:19 +0000
19@@ -0,0 +1,62 @@
20+Description: Fixed API incompatibility with PackageKit's InstallPackages.
21+ Ubuntu uses its own implementation of PackageKit, which behaves slightly
22+ differently.
23+Author: Thomas Leonard <talex5@gmail.com>
24+Origin: upstream, http://repo.or.cz/w/zeroinstall.git/commit/9b466b9b5fab731a9eaa565627cf3b2bea713153
25+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zeroinstall-injector/+bug/953756
26+Last-Update: 2012-03-26
27+
28+Index: zeroinstall-injector.dev/zeroinstall/injector/packagekit.py
29+===================================================================
30+--- zeroinstall-injector.dev.orig/zeroinstall/injector/packagekit.py 2012-03-26 17:05:10.902188000 +0100
31++++ zeroinstall-injector.dev/zeroinstall/injector/packagekit.py 2012-03-26 17:05:39.420375222 +0100
32+@@ -204,8 +204,8 @@
33+ package_name = self.packagekit_id
34+ self._transaction = _PackageKitTransaction(self.pk, installed_cb, error_cb)
35+ self._transaction.compat_call([
36+- ('InstallPackages', [package_name]),
37+ ('InstallPackages', False, [package_name]),
38++ ('InstallPackages', [package_name]),
39+ ])
40+
41+ _auth_wrapper(install_packages)
42+@@ -289,8 +289,8 @@
43+ defaultlocale = locale.getdefaultlocale()[0]
44+ if defaultlocale is not None:
45+ self.compat_call([
46+- ('SetLocale', defaultlocale),
47+ ('SetHints', ['locale=%s' % defaultlocale]),
48++ ('SetLocale', defaultlocale),
49+ ])
50+
51+ def getPercentage(self):
52+@@ -305,6 +305,8 @@
53+ except:
54+ return default
55+
56++ # note: Ubuntu's aptdaemon implementation of PackageKit crashes if passed the wrong
57++ # arguments (rather than returning InvalidArgs), so always try its API first.
58+ def compat_call(self, calls):
59+ for call in calls:
60+ method = call[0]
61+@@ -313,8 +315,9 @@
62+ dbus_method = self.proxy.get_dbus_method(method)
63+ return dbus_method(*args)
64+ except dbus.exceptions.DBusException as e:
65+- if e.get_dbus_name() != \
66+- 'org.freedesktop.DBus.Error.UnknownMethod':
67++ if e.get_dbus_name() not in (
68++ 'org.freedesktop.DBus.Error.UnknownMethod',
69++ 'org.freedesktop.DBus.Error.InvalidArgs'):
70+ raise
71+ raise Exception('Cannot call %r DBus method' % calls)
72+
73+@@ -340,7 +343,7 @@
74+ package_name, version, arch, repo_ = id.split(';')
75+ clean_version = distro.try_cleanup_distro_version(version)
76+ if not clean_version:
77+- _logger_pk.warn(_("Can't parse distribution version '%(version)s' for package '%(package)s'"), {'version': version, 'package': package_name})
78++ _logger_pk.info(_("Can't parse distribution version '%(version)s' for package '%(package)s'"), {'version': version, 'package': package_name})
79+ clean_arch = distro.canonical_machine(arch)
80+ package = {'version': clean_version,
81+ 'name': package_name,
82
83=== added file 'debian/patches/series'
84--- debian/patches/series 1970-01-01 00:00:00 +0000
85+++ debian/patches/series 2012-03-26 18:48:19 +0000
86@@ -0,0 +1,1 @@
87+packagekit-api.patch

Subscribers

People subscribed via source and target branches