On Wed, 2008-03-19 at 08:37 +0930, Iain Buchanan wrote:
> Any comments from Dr. J A Gow?
> 
> On Mon, 2008-03-17 at 11:54 +0000, John Carr wrote:
> > Hi again
> > 
> > >  if not os.path.exists(self.config_path):
> > >         if not os.path.isdir(self.config_dir):
> > >                 os.mkdir(self.config_dir)
> > >         oldconf = os.path.join(self.sepath,"config/config.xml")
> > >         shutil.copy(oldconf, self.config_path)
> > >
> > 
> > Remove this block all together. Reading UpdateConfig(), you see that
> > sync-engine will still run just fine without the config file. If you
> > look at the GlobalConfig object and self.cfg, it already has sane
> > defaults.

When I first introduced the config.xml into sync-engine I arranged that
sync-engine could indeed run fine without a config.xml to ensure
backwards-compatibility. It will indeed use sane defaults.

I added the code above later on. Firstly, it ensures that a virgin
installation will always place a default config.xml in the right place.
The default config.xml contains comments describing each element, and
its presence would help users who could simply open and read the file to
discover what can be tweaked and why. If the file is not there, then
those users who can not/do not have time to hunt through other docs may
not be aware of its existence. Secondly, packages can install a base
(default) config.xml into a location from which sync-engine can copy
each time a user starts sync-engine for the first time, or from which it
can be (re)copied should a user trash their config.xml.

There is no fundamental problem with this architecture, except that
packagers do not seem to know where to put the default config.xml! I
placed it in a directory off the root of sync-engine - if this is not
appropriate for packagers it can be moved with only minor code changes.

        John.




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to