[Erp5-report] r36271 kazuhiko - in /erp5/trunk/utils/erp5.recipe.zope2instance: ./ src/erp5...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 11 15:02:53 CEST 2010


Author: kazuhiko
Date: Fri Jun 11 15:02:39 2010
New Revision: 36271

URL: http://svn.erp5.org?rev=36271&view=rev
Log:
1.3 (2010-06-11)
----------------

- Move several directories that can be modified by business template
  installation to var directory and make symlinks to them.

Modified:
    erp5/trunk/utils/erp5.recipe.zope2instance/CHANGES.txt
    erp5/trunk/utils/erp5.recipe.zope2instance/setup.py
    erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py

Modified: erp5/trunk/utils/erp5.recipe.zope2instance/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.zope2instance/CHANGES.txt?rev=36271&r1=36270&r2=36271&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.zope2instance/CHANGES.txt [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.zope2instance/CHANGES.txt [utf8] Fri Jun 11 15:02:39 2010
@@ -1,6 +1,13 @@
 Changelog
 =========
 
+1.3 (2010-06-11)
+----------------
+
+- Move several directories that can be modified by business template
+  installation to var directory and make symlinks to them.
+  [kazuhiko]
+
 1.2 (2009-12-18)
 ----------------
 

Modified: erp5/trunk/utils/erp5.recipe.zope2instance/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.zope2instance/setup.py?rev=36271&r1=36270&r2=36271&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.zope2instance/setup.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.zope2instance/setup.py [utf8] Fri Jun 11 15:02:39 2010
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 name = "erp5.recipe.zope2instance"
-version = '1.2'
+version = '1.3'
 
 def read(name):
     return open(name).read()

Modified: erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py?rev=36271&r1=36270&r2=36271&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py [utf8] Fri Jun 11 15:02:39 2010
@@ -64,11 +64,19 @@ class Recipe(plone.recipe.zope2instance.
             '-u', options['user'],
             ) == 0
 
-        # patch begin: create several directories and a symlink for ERP5
-        for directory in ('Constraint', 'Document', 'PropertySheet', 'tests'):
-            path = os.path.join(location, directory)
-            if not os.path.exists(path):
-                os.mkdir(path)
+        # patch begin: create several directories and symlinks for ERP5
+        base_dir = self.buildout['buildout']['directory']
+        var_dir = options.get('var', os.path.join(base_dir, 'var'))
+        for directory in ('Constraint', 'Document', 'Extensions',
+                          'PropertySheet', 'tests'):
+            real_path = os.path.join(var_dir, directory)
+            if not os.path.exists(real_path):
+                os.mkdir(real_path)
+            link_path = os.path.join(location, directory)
+            if os.path.exists(link_path) and not os.path.islink(link_path):
+                shutil.rmtree(link_path)
+            if not os.path.exists(link_path):
+                os.symlink(real_path, link_path)
         for directory in ('bt5',):
             path = os.path.join(location, directory)
             if os.path.exists(path) and not os.path.islink(path):




More information about the Erp5-report mailing list