[packagekit] backend initialized multiple times when using pk-application

Richard Hughes hughsient at gmail.com
Thu Sep 20 15:40:39 PDT 2007


On Thu, 2007-09-20 at 21:46 +0200, Andreas wrote:
> Actually it's getting called twice even if you just start
> pk-application. pk-application then segfaults in
> pk_task_monitor_error_code_cb because alpm fails to lock the db twice.
> If I just ignore the error and exit with pk_backend_finished (backend)
> (where backend is the PkBackend * parameter passed to my implementation
> of backend_initialize) I get

Hmm, not a great idea IMO. Just emit error and return from init.

> and the job is still handled as 'in progress'.
> backend can't be null as I check with g_return_if_fail at the beginning.
> I'll continue research tomorrow.

I've added some code to PackageKit daemon to detect for this sort of
init failure, and hopefully handle it in a sane way. Does code from the
tonight's internal git server work better?

Richard.





More information about the PackageKit mailing list