[Erp5-report] r43177 kazuhiko - in /erp5/trunk/bt5/erp5_upgrader: ExtensionTemplateItem/ Sk...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 8 14:44:33 CET 2011


Author: kazuhiko
Date: Tue Feb  8 14:44:33 2011
New Revision: 43177

URL: http://svn.erp5.org?rev=43177&view=rev
Log:
2011-02-08 Kazuhiko
* remove upgrading MySQL charset part, that should be handled by buildout MySQL setup and reindexing with clear_catalog=1.
* remove handling zope version and python version, that should be handled by instance creation in buildout.

Removed:
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgradeCatalogCharsetSQL.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeMySQLCharset.xml
Modified:
    erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyUpgradeIntegrity.xml
    erp5/trunk/bt5/erp5_upgrader/bt/change_log
    erp5/trunk/bt5/erp5_upgrader/bt/revision

Modified: erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py?rev=43177&r1=43176&r2=43177&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py [utf8] Tue Feb  8 14:44:33 2011
@@ -103,53 +103,6 @@ def ERP5Site_clearActivities(self):
   os.remove(flag_fs_path)
   return
 
-def ERP5Site_upgradeMySQLCharset(self, upgrade=0):
-  """
-    Update the catalog charset running a external command.
-  """
-  from subprocess import Popen, PIPE
-  portal = self.getPortalObject()
-  message_list = []
-  database = portal.erp5_sql_connection.connection_string.split(' ')[0]
-  connection_string = ''
-  if '@' in database:
-    # This means the format database at hostname:port was used.
-    connection_string += ' -u root '
-    database_name , hostname = database.split("@")
-    if ":" in hostname:
-      new_hostname, port = hostname.split(":")
-      hostname = new_hostname
-      connection_string += ' --port=%s ' % port
-    connection_string += ' --host=%s ' % hostname
-    database = database_name
-
-  message = "ERP5Site_verifyMySQLCharset: Invalid configuration for: %s (%s)"
-  command = "echo \"show variables like '%%char%%'\" | mysql %s %s -Ns" % (connection_string, database)
-  stdout, stderr = Popen(command, stderr=PIPE, stdout=PIPE, 
-                         close_fds=True, shell=True).communicate()
-  for line in stdout.split("\n"):
-    if not line.strip(" ") == "" and \
-       not ('character_set_filesystem' in line and 'binary' in line) and \
-       not ('character_sets_dir' in line) and \
-       not ('utf8' in line and 'character_set_filesystem' not in line):
-      message_list.append(message % (database, line.replace("\t", " = ")))
-
-  if not upgrade:
-    return message_list
-  
-  if len(message_list) > 0:
-    message_list = ["Upgrade was required to ERP5Site_verifyMySQLCharset."]
-    SQL = portal.ERP5Site_getUpgradeCatalogCharsetSQL(context=portal)
-    command = "echo '%s' | mysql %s " % (SQL, connection_string)
-    stdout, stderr = Popen(command, stderr=PIPE, stdout=PIPE, 
-                           close_fds=True, shell=True).communicate()
-
-    message_list.append("Upgrade Executed required to ERP5Site_upgradeMySQLCharset.")
-    message_list.append("ERP5Site_upgraadeMySQLCharset STDERR: %s" % stderr) 
-    message_list.append("ERP5Site_upgradeMySQLCharset STDOUT: %s" % stdout)
-
-  return message_list 
-
 def ERP5Site_runVerificationScript(self, method_id):
   """ Run a Python Script return the method. This should avoid raise error, 
       even one intergrity verification script raise error, and provide good

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgradeCatalogCharsetSQL.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgradeCatalogCharsetSQL.xml?rev=43176&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgradeCatalogCharsetSQL.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgradeCatalogCharsetSQL.xml (removed)
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>database = context.erp5_sql_connection.connection_string.split(\' \')[0]\n
-database_name = database.split("@")[0]\n
-\n
-alter_table_str = "ALTER TABLE %s CHARSET=%s;"\n
-alter_database_str = "ALTER DATABASE %s %s=%s;"\n
-default_encode = \'utf8\'\n
-\n
-sql_list = []\n
-\n
-database_set_list = [\'CHARSET\']\n
-\n
-table_set_list = [\'catalog\',\'alarm\',\'catalog\',\'category\',\'delivery\',\'email\',\n
-                  \'full_text\',\'inventory\',\'inventory_stock\',\'item\',\'measure\',\n
-                  \'message\',\'message_queue\',\'movement\',\'portal_ids\',\'predicate\',\n
-                  \'predicate_category\',\'record\',\'roles_and_users\',\'stock\',\n
-                  \'subject\',\'translation\',\'versioning\']\n
-\n
-for data_set in database_set_list:\n
-  sql_list.append(alter_database_str % (database_name, data_set, default_encode))\n
-\n
-sql_list.append("USE %s;" % database_name)\n
-\n
-for table_set in table_set_list:\n
-  sql_list.append(alter_table_str % (table_set, default_encode))\n
-\n
-return \'\\n\'.join(sql_list)\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_getUpgradeCatalogCharsetSQL</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Modified: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml?rev=43177&r1=43176&r2=43177&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml [utf8] Tue Feb  8 14:44:33 2011
@@ -285,7 +285,6 @@ FINALIZE_ALARM_SCRIPT = ( \'ERP5Site_upg
                           \'ERP5Site_upgradeObjectClass\',\n
                           \'ERP5Site_upgradeSQLCatalogFilter\',\n
                           \'ERP5Site_upgradeAlarmToolConfiguration\',\n
-                         #\'ERP5Site_upgradeMySQLCharset\',\n
                         )\n
 \n
 # \n

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeMySQLCharset.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeMySQLCharset.xml?rev=43176&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeMySQLCharset.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeMySQLCharset.xml (removed)
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_function</string> </key>
-            <value> <string>ERP5Site_upgradeMySQLCharset</string> </value>
-        </item>
-        <item>
-            <key> <string>_module</string> </key>
-            <value> <string>ERP5UpgraderUtils</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_upgradeMySQLCharset</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Modified: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyUpgradeIntegrity.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyUpgradeIntegrity.xml?rev=43177&r1=43176&r2=43177&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyUpgradeIntegrity.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyUpgradeIntegrity.xml [utf8] Tue Feb  8 14:44:33 2011
@@ -69,8 +69,6 @@ message_list.extend(context.ERP5Site_upg
 \n
 message_list.extend(context.ERP5Site_upgradeSQLCatalog())\n
 \n
-message_list.extend(context.ERP5Site_upgradeMySQLCharset())\n
-\n
 if getattr(context, \'WizardTool_isPersonReferenceGloballyUnique\', None) is not None:\n
   if len(context.PersonModule_getUserAccountList(\'occupied\')) == 0 and \\\n
       getattr(portal.acl_users, \'nexedi_authentication\', None) is not None:\n

Modified: erp5/trunk/bt5/erp5_upgrader/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/bt/change_log?rev=43177&r1=43176&r2=43177&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/bt/change_log [utf8] Tue Feb  8 14:44:33 2011
@@ -1,4 +1,5 @@
 2011-02-08 Kazuhiko
+* remove upgrading MySQL charset part, that should be handled by buildout MySQL setup and reindexing with clear_catalog=1.
 * remove handling zope version and python version, that should be handled by instance creation in buildout.
 
 2011-02-07 Kazuhiko

Modified: erp5/trunk/bt5/erp5_upgrader/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/bt/revision?rev=43177&r1=43176&r2=43177&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] Tue Feb  8 14:44:33 2011
@@ -1 +1 @@
-570
\ No newline at end of file
+571
\ No newline at end of file



More information about the Erp5-report mailing list