Commit 1e6366ba authored by Rafael Monnerat's avatar Rafael Monnerat

Define which bt5 will update catalog on Upgrader Signature.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39074 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 91576a67
...@@ -153,6 +153,11 @@ REQUIRED_BT5_ID_LIST = ("erp5_core",\n ...@@ -153,6 +153,11 @@ REQUIRED_BT5_ID_LIST = ("erp5_core",\n
"express_customisation",\n "express_customisation",\n
)\n )\n
\n \n
# A list bt5 which are required to upgrade catalog.\n
# After the bt5 be updated, update catalog will be trigger.\n
UPDATE_CATALOG_BT5_ID_LIST = ()\n
\n
\n
# Call some scripts inside same transaction before or after BT update\n # Call some scripts inside same transaction before or after BT update\n
BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT = {}\n BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT = {}\n
AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT = {\'erp5_mysql_innodb_catalog\': (\'ERP5Site_updateSitePropertyForTestOnly\',)}\n AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT = {\'erp5_mysql_innodb_catalog\': (\'ERP5Site_updateSitePropertyForTestOnly\',)}\n
...@@ -554,6 +559,7 @@ signature_dict = {\n ...@@ -554,6 +559,7 @@ signature_dict = {\n
, \'required_bt5_id_list\': REQUIRED_BT5_ID_LIST\n , \'required_bt5_id_list\': REQUIRED_BT5_ID_LIST\n
# Provides a list of bt5 which can be upgraded by the upgrader (if already installed)\n # Provides a list of bt5 which can be upgraded by the upgrader (if already installed)\n
, \'upgradable_bt5_id_list\': UPGRADABLE_BT5_ID_LIST\n , \'upgradable_bt5_id_list\': UPGRADABLE_BT5_ID_LIST\n
, \'update_catalog_bt5_id_list\' : UPDATE_CATALOG_BT5_ID_LIST\n
, \'before_triggered_bt5_id_dict\': BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT\n , \'before_triggered_bt5_id_dict\': BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT\n
, \'after_triggered_bt5_id_dict\': AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT\n , \'after_triggered_bt5_id_dict\': AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT\n
# Provide a list of bt5 which require reinstallation\n # Provide a list of bt5 which require reinstallation\n
...@@ -631,6 +637,7 @@ else:\n ...@@ -631,6 +637,7 @@ else:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>UPGRADABLE_BT5_ID_LIST</string> <string>UPGRADABLE_BT5_ID_LIST</string>
<string>REQUIRED_BT5_ID_LIST</string> <string>REQUIRED_BT5_ID_LIST</string>
<string>UPDATE_CATALOG_BT5_ID_LIST</string>
<string>BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT</string> <string>BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT</string>
<string>AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT</string> <string>AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT</string>
<string>REINSTALABLE_BT5_ID_LIST</string> <string>REINSTALABLE_BT5_ID_LIST</string>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -94,6 +91,8 @@ upgradable_bt5_id_list = signature[\'upgradable_bt5_id_list\']\n ...@@ -94,6 +91,8 @@ upgradable_bt5_id_list = signature[\'upgradable_bt5_id_list\']\n
reinstalable_bt5_id_list = signature[\'reinstalable_bt5_id_list\']\n reinstalable_bt5_id_list = signature[\'reinstalable_bt5_id_list\']\n
before_triggered_bt5_id_dict = signature[\'before_triggered_bt5_id_dict\']\n before_triggered_bt5_id_dict = signature[\'before_triggered_bt5_id_dict\']\n
after_triggered_bt5_id_dict = signature[\'after_triggered_bt5_id_dict\']\n after_triggered_bt5_id_dict = signature[\'after_triggered_bt5_id_dict\']\n
update_catalog_bt5_id_list = signature[\'update_catalog_bt5_id_list\']\n
\n
\n \n
base_url_list = signature[\'bt5_base_url_list\']\n base_url_list = signature[\'bt5_base_url_list\']\n
installed_bt5_title_list = [o.getTitle() for o in portal_templates.getInstalledBusinessTemplateList()]\n installed_bt5_title_list = [o.getTitle() for o in portal_templates.getInstalledBusinessTemplateList()]\n
...@@ -117,7 +116,7 @@ def installBT5(bt5_title, previous_bt5, bt5_counter):\n ...@@ -117,7 +116,7 @@ def installBT5(bt5_title, previous_bt5, bt5_counter):\n
# We must make sure all documents from previous installations \n # We must make sure all documents from previous installations \n
# are already indexed (specially categories).\n # are already indexed (specially categories).\n
kw[\'after_method_id\'] = "immediateReindexObject"\n kw[\'after_method_id\'] = "immediateReindexObject"\n
update_catalog = portal_templates.TemplateTool_isUpdateCatalogRequired(bt5_title)\n update_catalog = bt5_title in update_catalog_bt5_id_list \n
before_triggered_bt5_id_list = before_triggered_bt5_id_dict.get(bt5_title, ())\n before_triggered_bt5_id_list = before_triggered_bt5_id_dict.get(bt5_title, ())\n
after_triggered_bt5_id_list = after_triggered_bt5_id_dict.get(bt5_title, ())\n after_triggered_bt5_id_list = after_triggered_bt5_id_dict.get(bt5_title, ())\n
keep_original_list = signature[\'keep_original_dict\'].get(bt5_title, ())\n keep_original_list = signature[\'keep_original_dict\'].get(bt5_title, ())\n
...@@ -227,6 +226,7 @@ return message_list\n ...@@ -227,6 +226,7 @@ return message_list\n
<string>reinstalable_bt5_id_list</string> <string>reinstalable_bt5_id_list</string>
<string>before_triggered_bt5_id_dict</string> <string>before_triggered_bt5_id_dict</string>
<string>after_triggered_bt5_id_dict</string> <string>after_triggered_bt5_id_dict</string>
<string>update_catalog_bt5_id_list</string>
<string>base_url_list</string> <string>base_url_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</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
By default the upgrade is never required for None of\n
Business template.\n
\n
This script will be probably rewrite on other skin folder.\n
"""\n
return 0\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>bt5_title</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>bt5_title</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TemplateTool_isUpdateCatalogRequired</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
534 535
\ 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