Commit cffb3816 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2011-02-08 Kazuhiko

* remove handling zope version and python version, that should be handled by instance creation in buildout.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43172 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c2ea8eae
...@@ -43,46 +43,6 @@ import os ...@@ -43,46 +43,6 @@ import os
# Methods introduced into portal_introspection into 5.4.3 # Methods introduced into portal_introspection into 5.4.3
# #
# XXX This method is a copy and paste of IntrospectionTool.getSystemSignatureDict
# This should be kept until versions lower than 5.4.3 still supported.
def getSystemSignatureDict(self):
"""
Returns a dictionnary with all versions of installed libraries
{
'python': '2.4.3'
, 'pysvn': '1.2.3'
, 'ERP5' : "5.4.3"
}
NOTE: consider using autoconf / automake tools ?
"""
def tuple_to_format_str(t):
return '.'.join([str(i) for i in t])
from Products import ERP5 as erp5_product
erp5_product_path = erp5_product.__file__.split("/")[:-1]
try:
erp5_v = open("/".join((erp5_product_path) + ["VERSION.txt"])).read().strip()
erp5_version = erp5_v.replace("ERP5 ", "")
except:
erp5_version = None
from App import version_txt
zope_version = tuple_to_format_str(version_txt.getZopeVersion()[:3])
from sys import version_info
# Get only x.x.x numbers.
py_version = tuple_to_format_str(version_info[:3])
try:
import pysvn
# Convert tuple to x.x.x format
pysvn_version = tuple_to_format_str(pysvn.version)
except:
pysvn_version = None
return { "python" : py_version , "pysvn" : pysvn_version ,
"erp5" : erp5_version, "zope" : zope_version
}
# XXX This method is a copy and paste of IntrospectionTool._loadExternalConfig # XXX This method is a copy and paste of IntrospectionTool._loadExternalConfig
# This should be kept until versions lower than 5.4.3 still supported. # This should be kept until versions lower than 5.4.3 still supported.
# NOT USED BY EXTERNAL METHOD # NOT USED BY EXTERNAL METHOD
......
<?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>getSystemSignatureDict</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ERP5UpgraderCompatibility</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getSystemSignatureDict</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>
...@@ -71,9 +71,6 @@ ALARM_DICT = {\n ...@@ -71,9 +71,6 @@ ALARM_DICT = {\n
# The destination release provided by this upgrader\n # The destination release provided by this upgrader\n
DESTINATION_RELEASE = \'5.4.7\'\n DESTINATION_RELEASE = \'5.4.7\'\n
\n \n
ZOPE_VERSION = "2.12.13"\n
\n
PYTHON_VERSION = "2.6"\n
# The list of URLs to get bt5 from.\n # The list of URLs to get bt5 from.\n
# Those places MUST be a Repository and contains a bt5list, if bt5list list\n # Those places MUST be a Repository and contains a bt5list, if bt5list list\n
# is not present, the directory will NOT be used to upgrade the instance.\n # is not present, the directory will NOT be used to upgrade the instance.\n
...@@ -333,10 +330,6 @@ signature_dict = {\n ...@@ -333,10 +330,6 @@ signature_dict = {\n
\'alarm_dict\' : ALARM_DICT\n \'alarm_dict\' : ALARM_DICT\n
# Defines the default release for bt5\n # Defines the default release for bt5\n
, \'release\': DESTINATION_RELEASE\n , \'release\': DESTINATION_RELEASE\n
# Defines the default version for zope\n
, \'zope\': ZOPE_VERSION\n
# Defines the default version for python\n
, \'python\': PYTHON_VERSION\n
# Defines the default release for products\n # Defines the default release for products\n
, \'product\': DESTINATION_RELEASE\n , \'product\': DESTINATION_RELEASE\n
# Defines the default location of bt5\n # Defines the default location of bt5\n
......
<?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
Upgrade Python at zopectl\n
"""\n
\n
python_version = context.ERP5Site_getUpgraderSignature()["python"]\n
current_python = context.portal_introspections.getSystemSignatureDict()[\'python\']\n
\n
if current_python == python_version:\n
return []\n
\n
if not upgrade:\n
return ["Upgrade required for Python Current: %s , Expected %s" % (\n
current_python,\n
python_version)]\n
\n
# XXX This change is too specific to TioLive servers environment.\n
new_python_path = "/usr/bin/python2.4"\n
context.portal_introspections.setPythonExecutable(new_python_path)\n
\n
return ["Upgraded Python Executable python was changed to %s" % (new_python_path)]\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_upgradePythonExecutable</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 Software Home in zopectl\n
"""\n
zope_version = context.ERP5Site_getUpgraderSignature()["zope"]\n
current_zope_version = context.portal_introspections.getSystemSignatureDict()[\'zope\']\n
\n
if current_zope_version == zope_version:\n
return []\n
\n
if not upgrade:\n
return ["Upgrade required for Zope Current: %s , Expected %s" % (\n
current_zope_version, zope_version)]\n
\n
# XXX This change is too specific to TioLive servers environment.\n
context.portal_introspections.setSoftwareHome(zope_version)\n
\n
return ["Upgrade Sotware home to: %s" % zope_version ]\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_upgradeSoftwareHome</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -59,10 +59,6 @@ portal = context.getPortalObject()\n ...@@ -59,10 +59,6 @@ portal = context.getPortalObject()\n
\n \n
message_list = []\n message_list = []\n
\n \n
message_list.extend(context.ERP5Site_upgradePythonExecutable())\n
\n
message_list.extend(context.ERP5Site_upgradeSoftwareHome())\n
\n
message_list.extend(context.ERP5Site_upgradeBusinessTemplateList())\n message_list.extend(context.ERP5Site_upgradeBusinessTemplateList())\n
\n \n
message_list.extend(context.ERP5Site_upgradeGlobalPropertyList())\n message_list.extend(context.ERP5Site_upgradeGlobalPropertyList())\n
......
...@@ -86,8 +86,6 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase): ...@@ -86,8 +86,6 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'reinstalable_bt5_id_list', 'reinstalable_bt5_id_list',
'keep_original_dict', 'keep_original_dict',
'object_action_dict', 'object_action_dict',
'zope',
'python',
'integrity_verification_script_id_list', 'integrity_verification_script_id_list',
'catalog_filter_dict', 'catalog_filter_dict',
'update_role_portal_type_list', 'update_role_portal_type_list',
......
2011-02-08 Kazuhiko
* remove handling zope version and python version, that should be handled by instance creation in buildout.
2011-02-07 Kazuhiko 2011-02-07 Kazuhiko
* check 'Update Business Template Workflows' and remove overriding of portal_workflow/business_template_installation_workflow/scripts/BusinessTemplate_install in this business template, but add it in 'Paths of objects that should be kept'. * check 'Update Business Template Workflows' and remove overriding of portal_workflow/business_template_installation_workflow/scripts/BusinessTemplate_install in this business template, but add it in 'Paths of objects that should be kept'.
* remove set and upgrade product_path, that should be handled by instance creation in buildout. * remove set and upgrade product_path, that should be handled by instance creation in buildout.
......
568 569
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment