On Mon, 2008-03-17 at 13:31 +0930, Iain Buchanan wrote:
> Hi,
> 
> just looking through the sync-engine code to tweak the gentoo package,
> and I came across this in config.py:
> 
> # check if we have a config
> 
> self.config_dir   = os.path.join(os.path.expanduser("~"), ".synce")
> self.config_path  = os.path.join(self.config_dir, "config.xml")
>               
> 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)
> 
> so if config.xml doesn't exist in ~/.synce it is copied from
> "self.sepath".  The only problem is self.sepath is set to
> "/usr/lib/python2.5/site-packages" a few lines earlier, so the default
> config.xml would have to be installed into
> "/usr/lib/python2.5/site-packages/config/config.xml"
> 

I can't speak for the packages, but the SVN version acquires the path
from the following statement. The path is not harcoded:

# Now, get our current path (this may be useful)
# Avoids messing about with having to pull a PREFIX from
# an installer
                
        self.sepath = str(xml2util).split()[3][1:-2]
        self.sepath = os.path.dirname(self.sepath)      
        self.sepath = os.path.dirname(self.sepath)      


This acquires the SyncEngine root from the location of xml2util.py. This
should be the root of the SyncEngine archive. The path to config.xml is
then constructed.

Therefore 'sepath' should be set to the root of the sync-engine install.

I wonder if it is the way in which the package is being installed: if
the entire sync-engine tree is dumped
in /usr/lib/python2.5/site-packages then I would indeed expect sepath to
be set to /usr/lib/python2.5/site-packages.


        John.


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