On Fr, 2011-01-07 at 14:12 +0000, Patrick Ohly wrote:
Since the beginning it was always possible to switch back and forth
between SyncEvolution releases. When backwards-incompatible on-disk
changes were necessary, the user had to explicitly asked for them with
the --migrate option (needed only once so far, to get the config layout
For 1.2, this will no longer be possible, because libsynthesis changes
its on-disk format ("binfile") in a backwards-incompatible way (can read
old format, but old version cannot read new one).
There's one catch here: if this was the only change, then SyncEvolution
would have to detect the version of libsynthesis at compile or even
runtime to enable or disable its own config version bump.
It becomes mute when SyncEvolution's own config changes, but the problem
On that occasion I also want to make several other changes which
prevent going back:
1. split "type" into independent options, to solve
2. rename "evolutionsource" to "database",
to "backendusername/password", with the old names accepted as
alias, but not being written to disk
I've implemented the versioning, but not yet these two points.
Here's how I intend to handle the transition:
* Pre-releases of 1.2 will refuse to do anything with a config
unless its complete context gets migrated with "--migrate
@<context>"; this will also migrate all configs inside that
context. The error message will explain this.
Here's the result:
[INFO] must change format of peer config 'funambol' in
[ERROR] error code from SyncEvolution local, status 22005:
Proceeding would modify config 'funambol' such that the previous
SyncEvolution release will not be able to use it. Stopping now.
Please explicitly acknowledge this step by running the following
command on the command line: syncevolution --migrate 'funambol'
After syncevolution --migrate 'funambol' the older release will complain
[INFO] config version check failed: peer config has format 1,
but this SyncEvolution release only supports format 0
[ERROR] SyncEvolution 22.214.171.124 is too old to read configuration
'funambol', please upgrade SyncEvolution.
by renaming ~/.config/syncevolution/default to
~/.config/syncevolution/default.old and then recreating
~/.config/syncevolution/default with the new content. So it will
be possible to go back, but only with slow or refresh syncs.
* The final 1.2 will do the migration automatically, because most
users (in particular those relying on a GUI) will have problems
with the pre-release error messages.
There's one catch here: the migration is supposed to be invisible to
such users. But as the code stands at the moment, the foobar.old config
will be visible to them.
1. do not keep the backup config around
2. filter out *.old in the list of configs reported via D-Bus
(which is what GUIs use); command line users will still see them
3. name the automatically generated backups like something which is
more obviously not created by a user, like .foobar.old, and hide
I prefer option 2. Power users will still be able to discover the
backups and throw them away with "--remove", whereas casual users won't
notice anything, as intended.
* I'll introduce .version files in
~/.config/syncevolution/* and ~/.config/syncevolution/*/peers/*.
The content are two numbers, one specifying the oldest format
definition that the directory is compatible with, the other
specifying the current definition.
I've implemented this slightly differently, with hidden version
properties in .internal.ini files.
Senior Software Engineer
Open Source Technology Center
Pützstr. 5 Phone: +49-228-2493652