[packagekit] PackageKit-qt crashes when the daemon fails to start

Trever Fischer wm161 at wm161.net
Sat Feb 7 23:15:41 PST 2009


According to a bug reported against KPackageKit 
(http://bugs.kde.org/show_bug.cgi?id=183565) a few days ago, PackageKit-qt can 
crash a program when packagekitd doesn't startup right. To be a bit more in-
depth, it asks the daemon to make a new transaction, and starts tossing around 
a null transaction ID. The failure to start can be because of some invalid 
default backend, or just a regular segfault.

So, what would be the best way to handle this situation? Have the library 
return some error about it not starting? Have the daemon give a more specific 
error signal about why it couldn't start (if it can live that long)?

I think adding some method to the Client class to ping the daemon and see if 
it is up and making all the transaction-generating methods return NULL if it 
isn't up would be a good solution. Another solution would be adding a check to 
see if daemon->GetTid() is null in ClientPrivate::createNewTransaction() and 
return NULL from there. Either way, the NULL eventually gets sent back up out 
of the library. Regular authentication error checking would catch it, but then 
we're using the same error condition for two totally different errors.

Any opinions?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090208/8be5fb61/attachment-0004.pgp>


More information about the PackageKit mailing list