[Erp5-report] r36151 luke - in /erp5/trunk/utils/erp5.recipe.mysqlserver: ./ src/erp5/recip...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 9 13:19:57 CEST 2010


Author: luke
Date: Wed Jun  9 13:19:52 2010
New Revision: 36151

URL: http://svn.erp5.org?rev=36151&view=rev
Log:
 - fix backward compatibility issue for buildout with profiles using old style (pre 1.1)

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

Modified: erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt?rev=36151&r1=36150&r2=36151&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt [utf8] Wed Jun  9 13:19:52 2010
@@ -1,5 +1,11 @@
 Changelog
 =========
+
+1.1.2 (2010-06-09)
+------------------
+
+- backward compatibility: allow to work on non updated profiles for > 1.1
+  [Lukasz Nowak]
 
 1.1.1 (2010-06-08)
 ------------------

Modified: erp5/trunk/utils/erp5.recipe.mysqlserver/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.mysqlserver/setup.py?rev=36151&r1=36150&r2=36151&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.mysqlserver/setup.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.mysqlserver/setup.py [utf8] Wed Jun  9 13:19:52 2010
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 name = "erp5.recipe.mysqlserver"
-version = '1.1.1'
+version = '1.1.2'
 
 def read(name):
     return open(name).read()

Modified: erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/__init__.py?rev=36151&r1=36150&r2=36151&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/__init__.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/__init__.py [utf8] Wed Jun  9 13:19:52 2010
@@ -66,9 +66,24 @@
       template_input_data = pkg_resources.resource_stream(__name__,
           'my.cnf.in').read()
 
-    file(self.options['mysql_cnf_file'], 'w').write(
+    try:
+      file(self.options['mysql_cnf_file'], 'w').write(
         WithMinusTemplate(template_input_data).substitute(
           self.options.copy()))
+    except KeyError:
+      if not template_file and 'mysql-cnf' in self.buildout:
+        # fall-back to old (bad) behaviour - fetch information from
+        # configuration and mysql-cnf while using internal template
+        # only in case if old type mysql-cnf part is found
+        self.logger.warning('Detected old style buildout profile '
+          'switching to backward compatible invocation')
+        fallback_dict = self.buildout['configuration'].copy()
+        fallback_dict['mysqld-extra-configuration'] = self.buildout[
+            'mysql-cnf']['mysqld-extra-configuration']
+        file(self.options['mysql_cnf_file'], 'w').write(
+          WithMinusTemplate(template_input_data).substitute(fallback_dict))
+      else:
+        raise
 
   def install(self):
     options = self.options




More information about the Erp5-report mailing list