On Mon, 2008-05-19 at 23:20 +0100, Mark Ellis wrote:

> Agree with the /etc thing, it doesn't really fit.

The point of having a system-wide config file is to allow distributions
to change defaults if necessary. For instance, if I decided to start
shipping opensync 0.3 in Mandriva Cooker, I would want to change synce's
default to 0.3 format, not 0.2. Without a system-wide config file, this
can only be done by patching the code (messy!), because distro packaging
should never ever touch anything in a user's home directory.

The standard system (and the one I'd recommend for synce) is for a
user's config file to override the system wide config file, if it exists
and has an explicit setting for the given option. So, say there are
three options - OPTION_A , OPTION_B and OPTION_C - that can all be set
to 0 or 1. The default in the software is 0. If you have this:

/etc/app.conf:

OPTION_B = 1
OPTION_C = 1

~/.app.conf:

OPTION_B = 0

What you will get is 0 for OPTION_A (app default), 0 for OPTION_B
(because the 0 in ~/.app.conf overrides the 1 in /etc/app.conf), and 1
for OPTION_C (because /etc/app.conf overrides the app default, and it's
not set in ~/.app.conf at all). That way it's still perfectly simple to
have per-user configuration where required.
-- 
adamw


-------------------------------------------------------------------------
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