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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 7 09:48:50 CET 2011


Author: kazuhiko
Date: Mon Feb  7 09:48:50 2011
New Revision: 43115

URL: http://svn.erp5.org?rev=43115&view=rev
Log:
2011-02-07 Kazuhiko
* remove set and upgrade product_path, that should be handled by instance creation in buildout.

Removed:
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_beforeUpgradeProductPath.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_setProductPath.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeProductPath.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyProductPathUpgrade.xml
Modified:
    erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderCompatibility.py
    erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py
    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/ERP5UpgraderCompatibility.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderCompatibility.py?rev=43115&r1=43114&r2=43115&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderCompatibility.py [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderCompatibility.py [utf8] Mon Feb  7 09:48:50 2011
@@ -119,58 +119,3 @@ def _getZopeConfigurationFile(relative_p
     raise IOError, 'The file: %s does not exist.' % file_path
 
   return open(file_path, mode)
-
-# XXX This method is a copy and paste of IntrospectionTool.setProductPath
-# This should be kept until versions lower than 5.4.3 still supported. 
-def setProductPath(self, relative_path):
-  """
-    Set the value of SOFTWARE_HOME for zopectl startup script
-    or from zope.conf (whichever is most relevant)
-
-    Rationale: multiple versions of Products can be present
-    on the same system
-
-    relative_path is usually defined by a number of release 
-     (ex. 5.4.2)
-
-    WARNING: the list of possible path should be protected 
-    if possible (ex. /etc/erp5/product)
-  """
-  # XXX Local to remove "self"
-  config = _loadExternalConfig()
-  allowed_path_list = config.get("main", "products").split("\n")
-  base_product_path_list = config.get("base", "base_product_path").split("\n")
-  if len(base_product_path_list) == 0:
-    raise Unauthorized(
-             "base_product_path_list is not defined into configuration.")
-
-  base_product_path = base_product_path_list[0]
-  path = base_product_path + relative_path
-
-  if path not in allowed_path_list:
-    raise Unauthorized(
-               "You are setting one Unauthorized path as Product Path (%s)." \
-                        % (path))
-
-  # XXX Local to remove "self"
-  config_file = _getZopeConfigurationFile("etc/zope.conf")
-  new_file_list = []
-  ignore_list = ['parts/cmf15', "parts/products-deps" , "parts/products-other"]
-  for line in config_file:
-    new_line = line
-    #if line.strip(" ").startswith("products %s" % (base_product_path)):
-    if line.strip(" ").startswith("products"):
-      # Only comment the line, so it can easily reverted 
-      if len([i for i in ignore_list if i in line]) == 0:
-        new_line = "#%s" % (line)
-    new_file_list.append(new_line)
-  new_file_list.append("products %s\n" % (path))
-  config_file.close()    
-
-  # reopen file for write
-  # XXX Local to remove "self"
-  config_file = _getZopeConfigurationFile("etc/zope.conf", "w")
-  config_file.write("".join(new_file_list))
-  config_file.close()
-  return 
-

Modified: erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py?rev=43115&r1=43114&r2=43115&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/ExtensionTemplateItem/ERP5UpgraderUtils.py [utf8] Mon Feb  7 09:48:50 2011
@@ -47,27 +47,6 @@ def ERP5Site_editERP5SiteProperty(self, 
   method(prop, value)
   return True
 
-def ERP5Site_verifyProductPathUpgrade(self):
-  """
-    Due activities concurrency, it is needed that the upgrade process
-    only proceed after restart be sucessfully done. 
-
-    This script make sure that the process will wait for the
-    Prodcuts be upgraded to proceed.
-
-    This method is not elegant solution but it is essential part 
-    between restart zope and update Activities.
-  """
-  # check if the products are already updated.
-  if len(self.ERP5Site_upgradeProductPath()) > 0:
-    # Wait at least 20 seconds before try again
-    # This will prevent the activities be invoked
-    # too early.
-    sleep(20)
-    # Force failure for restart the activity
-    raise 
-  return
-
 def ERP5Site_restartZopeInstance(self):
   """
     Zope must be restart after update the Products or Software

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_beforeUpgradeProductPath.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_beforeUpgradeProductPath.xml?rev=43114&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_beforeUpgradeProductPath.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_beforeUpgradeProductPath.xml (removed)
@@ -1,72 +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># Update activity tables before upgrade upgrade products.\n
-# XXX The followed scripts could be even more generic.\n
-\n
-column_list = [i[0] for i in context.portal_activities.ActivityTool_showMessageQueueTableColumns()]\n
-if \'group_method_id\' not in column_list:\n
-  context.portal_activities.ActivityTool_upgradeMessageQueueTable()\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_beforeUpgradeProductPath</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_setProductPath.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_setProductPath.xml?rev=43114&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_setProductPath.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_setProductPath.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>setProductPath</string> </value>
-        </item>
-        <item>
-            <key> <string>_module</string> </key>
-            <value> <string>ERP5UpgraderCompatibility</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_setProductPath</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string>Method not present after 5.4.3 into portal Introspections</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeProductPath.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeProductPath.xml?rev=43114&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeProductPath.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeProductPath.xml (removed)
@@ -1,96 +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>"""\n
-  Update Product Path in zope.conf\n
-\n
-  ERP5Site_getSystemSignatureDict and ERP5Site_setProductPath are \n
-  used to keep backward compatibility with newer implementations.\n
-"""\n
-\n
-signature = context.ERP5Site_getUpgraderSignature()\n
-try:\n
-  product_version = context.portal_introspections.getSystemSignatureDict()[\'erp5\']\n
-except:\n
-  # Try to use externals instead because portal_introspections is not available.\n
-  product_version = context.ERP5Site_getSystemSignatureDict()[\'erp5\']\n
-\n
-if product_version == signature["release"]:\n
-  return []\n
-\n
-if not upgrade:\n
-  return ["Upgrade required for Products. Current: %s , Expect %s" % (\n
-            product_version, signature["release"]) ]\n
-\n
-context.ERP5Site_beforeUpgradeProductPath()\n
-\n
-try:\n
-  context.portal_introspections.setProductPath(signature["release"])\n
-except:\n
-  # Try to use externals instead because portal_introspections is not available.\n
-  context.ERP5Site_setProductPath(signature["release"])\n
-\n
-return ["Upgraded Product Path List to %s" % (signature["release"])]\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>upgrade=0</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_upgradeProductPath</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyProductPathUpgrade.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyProductPathUpgrade.xml?rev=43114&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyProductPathUpgrade.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyProductPathUpgrade.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_verifyProductPathUpgrade</string> </value>
-        </item>
-        <item>
-            <key> <string>_module</string> </key>
-            <value> <string>ERP5UpgraderUtils</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ERP5Site_verifyProductPathUpgrade</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=43115&r1=43114&r2=43115&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] Mon Feb  7 09:48:50 2011
@@ -63,8 +63,6 @@ message_list.extend(context.ERP5Site_upg
 \n
 message_list.extend(context.ERP5Site_upgradeSoftwareHome())\n
 \n
-message_list.extend(context.ERP5Site_upgradeProductPath())\n
-\n
 message_list.extend(context.ERP5Site_upgradeBusinessTemplateList())\n
 \n
 message_list.extend(context.ERP5Site_upgradeGlobalPropertyList())\n

Modified: erp5/trunk/bt5/erp5_upgrader/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/bt/change_log?rev=43115&r1=43114&r2=43115&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/bt/change_log [utf8] Mon Feb  7 09:48:50 2011
@@ -1,3 +1,9 @@
+2011-02-07 Kazuhiko
+* remove set and upgrade product_path, that should be handled by instance creation in buildout.
+
+2011-02-04 Kazuhiko
+* remove system_upgrader and product_upgrader, that should be handled by instance creation in buildout.
+
 2010-09-30 lucas
 * Added message to be logged if during the upgrade of the Local Roles for security groups the Portal Type document does not exists.
 

Modified: erp5/trunk/bt5/erp5_upgrader/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/bt/revision?rev=43115&r1=43114&r2=43115&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] Mon Feb  7 09:48:50 2011
@@ -1 +1 @@
-566
\ No newline at end of file
+567
\ No newline at end of file



More information about the Erp5-report mailing list