GNOME Bugzilla – Bug 578238
Assumes packagekit is always available if compiled with packagekit support
Last modified: 2009-04-08 11:23:49 UTC
Hi, If nautilus is compiled with packagekit support for installing applications when a user tries to open a file with unknown mime type then it assumes packagekit is always available. However, packagekit is a dbus service, so it doesn't have to be. If packagekit isn't installed then you get the "search for applications" dialog, and then immediately an error. Nautilus should instead check whether packagekit is available before showing the dialog. Thanks, James Other information:
Created attachment 132289 [details] [review] detect the presence of packagekit on the session bus at runtime Hi, Here's my proposed patch to detect packagekit at runtime, and show the unhelpful dialog if it is not present on the bus. PackageKit doesn't support activation on the session bus currently, so this is good enough. If that ever changes then this may want to try and start it instead of just looking for it. I would appreciate review and testing of this as I spend most of my time coding single threaded python, so there's a high chance of problems. I may seek inclusion of this change in to the Ubuntu packages to attempt to give those who want to use PackageKit a better experience. (As we don't have it by default we should really turn of this feature in gconf. Even with this change there is a secondary issue that our PackageKit is too old to have the right method, so this still fails, so we may disable it anyway, I'm going to talk to seb128 about it). Thanks, James
Its kinda g_warning happy in case packagekit is not around. Maybe we should drop that.
otherwise it looks good to me, i've asked the packagekit author (who did the initial work on this in nautilus) to look at it too.
cc1: warnings being treated as errors nautilus-mime-actions.c: In function ‘packagekit_present_dbus_call_notify_cb’: nautilus-mime-actions.c:1343: error: unused variable ‘remote’ I'll test it in a few minutes.
Seems to work fine for me when the compile error is fixed.
commited.
Thanks.