GNOME Bugzilla – Bug 610813
Packagekit integration should not rely on session bus detection
Last modified: 2010-02-24 12:54:34 UTC
file-roller tries to detect if PackageKit is available by searching for it over dbus session bus. This is incorrect since nowadays, Packagekit is activated on demand by dbus : using packagekit 0.6.1, file-roller won't be able to use PackageKit unless you manually start gpk-dbus-service
I just used the way suggested by the PackageKit author here https://bugzilla.gnome.org/show_bug.cgi?id=482560#c9
I've asked Richard before filling this bug. I guess his comments were based on PackageKit state at the time of his writing ;) Richard, your comment ?
(In reply to comment #1) > I just used the way suggested by the PackageKit author here > https://bugzilla.gnome.org/show_bug.cgi?id=482560#c9 Sure, there is a DBus interface, but it's only started when the first thing issues a method. So if you just try to detect if it's there and then never issue a request then the process never gets started :-) What you need to do is just issue the DBus request like we are doing, and then deal with failure, rather than trying to detect if GPK is on the bus.
I removed the call to "NameHashOwner", however the service still doesn't start, the following error is returned: "the name org.freedesktop.PackageKit was not provided by any .service files" on my system (Ubuntu 10.04) the file org.freedesktop.PackageKit.service is located in the folder /usr/share/dbus-1/system-services any idea?
there are two "services", one system (provided by packagekit) and one session (provided by gnome-package or kpackagekit), in /usr/share/dbus-1/services/org.freedesktop.PackageKit.service (with recent enough gnome-packagekit / kpackagekit). I've tested your patch with latest gnome-packagekit, it works fine (it could be better to change mouse cursor to hour glass while dbus query is running, it can be a little long until you see a window to appear, if packagekit wasn't running already.
changed the cursor as well, closing as fixed...