After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723614 - Restore from GConf only once
Restore from GConf only once
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.12.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2014-02-04 15:44 UTC by Stanislav Brabec
Modified: 2015-03-05 21:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (2.44 KB, patch)
2015-03-05 11:38 UTC, Milan Crha
committed Details | Review
evo patch (1.22 KB, patch)
2015-03-05 11:39 UTC, Milan Crha
committed Details | Review

Description Stanislav Brabec 2014-02-04 15:44:37 UTC
I experience duplication of all imapx accounts in the both Preferences and left panel on Evolution restart. It happens several times a week.

Manual removing of superfluous accounts in Preferences help, but only for a short time. It happens again and again.

Duplication happens on Evolution start or quit, never during regular work.

Evolution does not crash, just all imapx accounts are listed twice. Gmail and local folders are not affected.

evolution-3.10.2
evolution-data-server-3.10.2
openSUSE 13.1 x86_64
Comment 1 Matthew Barnes 2014-02-04 17:26:01 UTC
I can't imagine how that can happen, but all the account files are in ~/.config/evolution/sources.  You might want to monitor that directory to see if you spot a pattern of new files showing up.
Comment 2 Stanislav Brabec 2014-02-04 21:00:56 UTC
I have a yesterday backup of the ~/.config/evolution/sources made while evolution was running.

I have 2 imapx accounts, and yesterday snapshot contains six files with a time stamp early after yesterday evolution start.

Today morning (next evolution start) I seen two superfluous accounts and deleted them in preferences. Now I have again 6 files less.

It seems, that Evolution sometimes re-creates old sources from some type of backup. The freshly created files use my old machine name (I do not have this machine for more than 4 years.)
Comment 3 Stanislav Brabec 2014-09-10 14:45:43 UTC
Reproduced in evolution-3.12.5.
Comment 4 Matthew Barnes 2014-09-10 16:02:32 UTC
You probably have old account data in GConf.  It might be that because of your machine name change, E-D-S does not recognize the old accounts as duplicates and repeatedly restores them from GConf.

Delete the account data in GConf yourself, and also for good measure make sure you no longer have a ~/.evolution directory.
Comment 5 Stanislav Brabec 2014-09-10 16:55:48 UTC
My ~/.evolution does not exist for a long time, but gconf database still contains lot of keys under evolution. I removed all sources keys, and duplication did not happen. It also duplicated signatures, but old half was broken.

The upgrade logic is probably not correct: Once the migration of data and accounts import from gconf is completed, it should be called never again.
Comment 6 Matthew Barnes 2014-09-10 18:24:19 UTC
(In reply to comment #5)
> The upgrade logic is probably not correct: Once the migration of data and
> accounts import from gconf is completed, it should be called never again.

It does so by deleting the relevant %gconf.xml files directly, but if the GConf daemon is already running those files might be recreated when the daemon exits.

The alternative is to delete the data "properly" through the GConf client API, but that would conflict with not depending on GConf anymore.
Comment 7 Milan Crha 2015-03-05 11:11:25 UTC
I would add an option into GSettings that the GConf migration was done and do not do it again, if the option is set. The option will be unset, in case an old backup file, still with GConf data, is restored.
Comment 8 Milan Crha 2015-03-05 11:38:30 UTC
Created attachment 298627 [details] [review]
eds patch

for evolution-data-server;

Adds and uses the gsettings org.gnome.evolution-data-server.migrated bool key.
Comment 9 Milan Crha 2015-03-05 11:39:40 UTC
Created attachment 298628 [details] [review]
evo patch

for evolution;

Unsets the key when restoring GConf settings, thus the source registry Reload() will start the migration.
Comment 10 Milan Crha 2015-03-05 21:06:17 UTC
I've got an approval, thus:

Created commit_9d11edc in eds master (3.15.92+) [1]
Created commit_842adab in evo master (3.15.92+) [2]

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=9d11edc
[2] https://git.gnome.org/browse/evolution/commit/?id=842adab