[packagekit] Python bindings part 2
Martin Pitt
martin.pitt at ubuntu.com
Thu Jul 24 07:19:37 PDT 2008
Hi again,
Martin Pitt [2008-07-24 16:10 +0200]:
> I just figured out how to use async_callbacks in a D-BUS server. When
> I use that, the bug I mentioned (FD #16668) doesn't happen.
>
> This solution is pretty elegant, it essentially means that wait()
> doesn't need to be called at all any more. Resolve() (and other
> functions) would trigger the D-BUS call and store the result/error
> closures, and the "Finished" signal handler would deliver the return
> value of the call to the to the result closure.
>
> But that doesn't work at all if you want to use the Python class in
> just a normal program (not as part of a D-BUS service method). I
> wonder whether there is any chance of having code which works in both
> cases, so that I can just use the code from your packagekit branch
> instead of keeping a copy with the async_callbacks approach in Jockey?
Sorry, that was BS of course. It doesn't make sense to copy&paste the
PK querying code around into every single D-BUS service method in
order to use the async_callbacks interface. Even less so, since there
are two or three layers of other code in between the service method
and the PackageKit call. So for libraries like this, the async
frontend is pretty useless, and I guess I'm stuck with
#https://bugs.freedesktop.org/show_bug.cgi?id=14581 until I can go
ahead and actually use PackageKit :-(
So, please ignore my previous comment.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/packagekit/attachments/20080724/fca5ddc0/attachment.pgp
More information about the PackageKit
mailing list