[Evolution-hackers] Move backup/restore to evolution-source-registry?



As much as I wish we could be rid of it, many Evolution users still rely
on our backup/restore feature for things it was not intended for such as
system upgrades.  So I'll concede the feature is probably here to stay,
at least for the foreseeable future.

It seems not only messy but risky for Evolution to be handling backups
and restores though.  Evolution itself may shut down before initiating
the operation, but the E-D-S services remain running the whole time,
potentially writing to the directories being backed up or restored.

It occurred to me that the backup/restore feature could be made cleaner,
safer and more reliable by converting the implementation in Evolution to
an evolution-source-registry module and exporting a D-Bus interface for
initiating a backup or restore.  (The evolution-backup tool would still
handle the UI bits, just not do any actual work itself.)

When initiating a backup or restore, the registry module could first
unexport all data sources, which would effectively shut down all the
backends since they'll see it as a "source-removed" signal.

While the backup or restore is running (in-process, not by spawning a
separate tool), the registry server could be placed in a "busy" state
such that any subsequent D-Bus method invocations would be denied with
a G_IO_ERROR_BUSY response.  Meanwhile, the backup/restore module could
report progress back to the requesting client.

When the backup or restore is finished, the registry server would
immediately reboot itself with:

    e_dbus_server_quit (server, E_DBUS_SERVER_EXIT_RELOAD)

instead of depending on the client to tell it to.

Does that sound like an improvement over the way it works now?

Matthew Barnes



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]