I have banged my head around integrating PackageKit into Jockey for several days now, and it’s driving me up the wall. While a standalone PackageKit client works very well, it completely breaks when I integrate the PackageKit client into my Jockey D-BUS backend.
At first I assumed I just made something wrong, so I tried a dozen different approaches, read the libpackagekit source, added a ton of debugging statements, but nothing helps, I never get back D-BUS signals from PackageKit while being in an inner gobject.MainLoop() in a D-BUS service handler. I use the exact approach that libpackagekit uses as well, so I don’t think I’m completely on crack.
I’m more and more convinced that this is an actual bug in dbus-python or perhaps in d-bus itself. I filed an upstream bug now, and really hope that some D-BUS expert can help me here.
#1 by anon on 2008/07/11 - 03:04
Zitieren
It’s being greedy… tried giving it cookies to please it?
#2 by Johan on 2008/07/11 - 08:17
Zitieren
I had problems getting it to work too until I found some code sample that imported dbus.glib for no apparent reason. When I added that, I started receiving signals.
#3 by martinpitt on 2008/07/11 - 08:45
Zitieren
John, hm. “import dbus.glib” is the (very) old way of setting the default D-BUS main loop, which you now have to do explicitly with “dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)”, don’t you?
#4 by martinpitt on 2008/07/11 - 08:50
Zitieren
John, I just gave it a try, just for fun. Didn’t work. But thank you anyway!