On Sun, 2008-01-06 at 16:56 +0000, Dr J A Gow wrote:
> In general disambiguation is a good thing. But why should both of them
> be present in the same directory? Surely we should only copy/symlink the
> appropriate plugin for the particular installed version of OpenSync -
> not copy them both over (and thus have an unused module in OpenSync's
> plugin directory)?

Well, you talk about copy/symlinking the appropriate plugin, but from
where? I think the days of running SyncEngine from the directory you
checked it out from are gone. I'm not sure what's the problem with
having two opensync modules in the folder -- it's not as if they're are
very big:

reger:~/sync-engine% du -hs opensync-plugin*.py
16K     opensync-plugin-0.30later.py
12K     opensync-plugin.py

> If we do copy/symlink them both over, and then disambiguate them, there
> is potential for someone to select the wrong plugin. If we detect the
> installed version of Opensync and install only the right one - there is
> less margin for error.

Well, this is a fair point. Check out the attached patch and tell me
what you think.

[P.S. I subscribe to all lists I post to, so I need not be CC'd on
responses]

-- 
Jonny Lamb, UK                           [EMAIL PROTECTED]
http://jonnylamb.com                             GPG: 0x2E039402
diff --git a/setup.py b/setup.py
index 6a968c8..49f6993 100644
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,12 @@ elif exitstatus == 32512:
     print 'Could not get OpenSync plugin directory; pkg-config is not installed.'
     sys.exit(1)
 
+opensync_version = commands.getoutput('pkg-config opensync-1.0 --modversion')
+if opensync_version >= 0.30:
+    pluginfile = ['opensync-plugin-0.30later.py']
+else:
+    pluginfile = ['opensync-plugin.py']
+
 setup(
     name = "SyncEngine",
     version = "0.1",
@@ -29,7 +35,7 @@ setup(
         '': ['*.xsl'],
     },
     data_files = [
-        (plugindir+'/python-plugins', ['opensync-plugin-0.30later.py', 'opensync-plugin.py'])
+        (plugindir+'/python-plugins', pluginfile)
     ]
 )
 

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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