korgac: only try to start Akonadi if it has been configured
ClosedPublic

Authored by dvratil on Jun 29 2016, 8:46 PM.

Details

Summary

korgac is autostarted on login. We don't want it to start up Akonadi
though if the user has not set up Akonadi yet. In that case (i.e. when
akonadiserverrc does not exist yet), korgac will wait for the server
to be started and only then continues to set up ETM and other Akonadi
stuff. If Akonadi has been configured previously, then korgac will
just continue to create ETM and thus start Akonadi if necessary right
after login.

Diff Detail

Repository
R43 KDE PIM
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dvratil updated this revision to Diff 4861.Jun 29 2016, 8:46 PM
dvratil retitled this revision from to korgac: only try to start Akonadi if it has been configured.
dvratil updated this object.
dvratil edited the test plan for this revision. (Show Details)
dvratil added a reviewer: kde-pim.
Restricted Application added a project: KDE PIM. · View Herald TranscriptJun 29 2016, 8:46 PM

code looks good.
I suppose the simple existence of the akonadiserverrc file is a good enough semaphore, although I might like to see an "enabled=[true|false]" key value pair in the rc file to make sure. in any event, +1 from me.

code looks good.
I suppose the simple existence of the akonadiserverrc file is a good enough semaphore, although I might like to see an "enabled=[true|false]" key value pair in the rc file to make sure. in any event, +1 from me.

If you mean "enabled" as in if korgac is enabled, then that's already handled by the condition in the autostart .desktop file:

X-KDE-autostart-condition=korgacrc:General:Autostart:true

So when user disables korgac, it won't even start, so no problem with it inadvertently starting Akonadi.

code looks good.
I suppose the simple existence of the akonadiserverrc file is a good enough semaphore, although I might like to see an "enabled=[true|false]" key value pair in the rc file to make sure. in any event, +1 from me.

If you mean "enabled" as in if korgac is enabled, then that's already handled by the condition in the autostart .desktop file:

X-KDE-autostart-condition=korgacrc:General:Autostart:true

So when user disables korgac, it won't even start, so no problem with it inadvertently starting Akonadi.

No I mean that you are relying only on the existence of akonadiserverrc and not any contents inside akonadiserverrc.
so even a 0-byte file would mean "yep, akonadi server is setup". A little more robust would be some flag inside akonadiserverrc letting us know that in fact the user has setup akonadi. no biggie.

LGTM, for what I can understand of PIM. ;)

This revision was automatically updated to reflect the committed changes.

@winterz I landed the patch, but Phab won't let me close the review unless it's marked as accepted, could you please update it?

@winterz I landed the patch, but Phab won't let me close the review unless it's marked as accepted, could you please update it?

Nvm, it autoclosed after all, just took a bit longer :)