On Sat, 2008-05-17 at 11:58 +0100, Dr J A Gow wrote:
> 
> On Sat, 2008-05-17 at 02:59 -0700, Adam Williamson wrote:
> > On Sat, 2008-05-17 at 10:52 +0100, Dr J A Gow wrote:
> > 
> > > An example, again, would be the OpensyncXMLFormat. It's not a good
> > > example, but the only one I can think of at the moment. The default is
> > > currently OS20, as this is the mainstream version. But let's say that a
> > > user had OS0.3x installed, and had reset this element in their
> > > config.xml appropriately. Now the config.xml gets lost, and sync-engine
> > > run subsequently. Firing OS20 data at OS30 is guaranteed to generate a
> > > load of empty contacts! Not good, and time-consuming to fix!
> > 
> > That's true, but ironically, not actually covered by synce at
> > present. :) AFAIK, sync-engine will happily run if ~/.synce/config.xml
> > does not exist, even if it *previously* existed. It'll just copy it
> > afresh from /usr - and, naturally, everything then gets reset to
> > defaults. OS30 gets reset to OS20, and chaos ensues, as you point out.
> > The only case that actually causes sync-engine to fail to run at present
> > is if ~/.synce/config.xml doesn't exist, and it can't find the
> > 'original' in /usr . The case where a user inadvertently (or
> > maliciously, or whatever...) deletes ~/.synce/config.xml , but the
> > 'original' is still available in /usr, isn't 'protected' against at all.
> 
> Very true. So perhaps we should continue to allow sync-engine to fail
> only in the case where the 'original' is missing (it now has no defaults
> active in it). This would be a broken install or a user too handy with
> the rm command.
> 
> Or am I misunderstanding you slightly? Were you saying that we should
> place the 'original' in /etc, rather than in the source tree, and then
> copy from this to ~/.synce if the ~/.synce/config.xml is not present?
> 
> This would retain the per-user config, while placing the
> 'original' (empty except for comments) config.xml in /etc? The file
> in /etc would never be read at runtime, but used as a template if the
> user's ~/.synce/config.xml was missing?
> 
> If you can clarify this it would help.
> 

I'll throw in my two penneth for a laugh :)

I've always considered copying the default file to ~/.synce excessive.
In fact I would consider the _application_ copying the file anywhere to
be excessive, that is a distro or an install thing. How about this...

1) sensible defaults in the app (which they are)

2) (maybe) check for a config file in /etc, if it doesn't exist, fine

3) check for a config file in ~/.synce, if it doesn't exist, fine

You then get defaults, or system config, or user config, but it's all
done knowingly ie. if someone changes or places or removes a config
file, they know it's been done.

If we need a template config.xml, stick it in /usr/share/doc/examples.

Mark


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to