Commit ff434999 authored by Rafael Monnerat's avatar Rafael Monnerat

Define in upgrader signature if site will be recatalogued or NOT. By default it will be.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39075 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e6366ba
...@@ -539,6 +539,8 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n ...@@ -539,6 +539,8 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n
\'Products.ERP5Type.Document.Gadget.Gadget\', \n \'Products.ERP5Type.Document.Gadget.Gadget\', \n
\'ERP5Site_testUpgradeObjectClass\' ), )\n \'ERP5Site_testUpgradeObjectClass\' ), )\n
\n \n
RECATALOG = True\n
\n
# Wrap everything into a dict\n # Wrap everything into a dict\n
signature_dict = {\n signature_dict = {\n
# Defines the alarms enabled for the upgrade\n # Defines the alarms enabled for the upgrade\n
...@@ -580,6 +582,8 @@ signature_dict = {\n ...@@ -580,6 +582,8 @@ signature_dict = {\n
, \'erp5_site_property_dict\' : ERP5_SITE_PROPERTY_DICT\n , \'erp5_site_property_dict\' : ERP5_SITE_PROPERTY_DICT\n
# Provide a list of tuples with informations to upgrade object class\n # Provide a list of tuples with informations to upgrade object class\n
, \'upgrade_object_class_list\' : UPGRADE_OBJECT_CLASS_LIST\n , \'upgrade_object_class_list\' : UPGRADE_OBJECT_CLASS_LIST\n
# Define if the site will be recatalogued or not after finish upgrade.\n
, \'recatalog\' : RECATALOG\n
}\n }\n
\n \n
if item is not None:\n if item is not None:\n
...@@ -650,6 +654,7 @@ else:\n ...@@ -650,6 +654,7 @@ else:\n
<string>INTEGRITY_VERIFICATION_SCRIPT_ID_LIST</string> <string>INTEGRITY_VERIFICATION_SCRIPT_ID_LIST</string>
<string>ERP5_SITE_PROPERTY_DICT</string> <string>ERP5_SITE_PROPERTY_DICT</string>
<string>UPGRADE_OBJECT_CLASS_LIST</string> <string>UPGRADE_OBJECT_CLASS_LIST</string>
<string>RECATALOG</string>
<string>signature_dict</string> <string>signature_dict</string>
</tuple> </tuple>
</value> </value>
......
...@@ -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>
...@@ -59,6 +56,9 @@ ...@@ -59,6 +56,9 @@
standard way to detect if the SQLUpgrade is needed. Reindexation should \n standard way to detect if the SQLUpgrade is needed. Reindexation should \n
be only a consequence of other script only.\n be only a consequence of other script only.\n
"""\n """\n
signature = context.ERP5Site_getUpgraderSignature()\n
if not signature.get("recatalog", True):\n
return []\n
\n \n
if not upgrade:\n if not upgrade:\n
# Never consider outdated.\n # Never consider outdated.\n
...@@ -123,9 +123,11 @@ return message_list\n ...@@ -123,9 +123,11 @@ return message_list\n
<value> <value>
<tuple> <tuple>
<string>upgrade</string> <string>upgrade</string>
<string>message_list</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>signature</string>
<string>True</string>
<string>message_list</string>
<string>catalog</string> <string>catalog</string>
<string>tag</string> <string>tag</string>
</tuple> </tuple>
......
535 536
\ 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