From 139babeb1f355ea30ade2de1beaa4b372ef7e0d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Tue, 14 Aug 2012 17:03:56 +0200
Subject: [PATCH] First iteration of 2012.08 upgrade.

---
 .../ERP5Site_getUpgraderSignature.xml         | 96 +++++++++++--------
 .../vifib_upgrader_before_201208.xml          | 26 +++++
 .../Computer_updateLocalRoles.xml             |  0
 .../ERP5Site_deliverSetupUpdateDelivery.xml   |  0
 ...Site_garbageCollectHostingSubscription.xml |  0
 .../ERP5Site_migrateSlapState.xml             |  0
 ...5Site_removeSimulationOrderedSaleOrder.xml |  0
 .../ERP5Site_updateComputerLocalRoles.xml     |  3 +
 ...ubscription_garbageCollectForMigration.xml |  0
 .../SaleOrder_removeAppliedRuleOnOrdered.xml  |  0
 .../SalePackingListLine_deliver.xml           |  0
 .../SlapDocument_migrateSlapState.xml         |  0
 master/bt5/vifib_upgrader/bt/revision         |  2 +-
 .../vifib_upgrader/bt/template_skin_id_list   |  3 +-
 14 files changed, 88 insertions(+), 42 deletions(-)
 create mode 100644 master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208.xml
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/Computer_updateLocalRoles.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/ERP5Site_deliverSetupUpdateDelivery.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/ERP5Site_garbageCollectHostingSubscription.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/ERP5Site_migrateSlapState.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/ERP5Site_removeSimulationOrderedSaleOrder.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/ERP5Site_updateComputerLocalRoles.xml (93%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/HostingSubscription_garbageCollectForMigration.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/SaleOrder_removeAppliedRuleOnOrdered.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/SalePackingListLine_deliver.xml (100%)
 rename master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/{vifib_upgrader => vifib_upgrader_before_201208}/SlapDocument_migrateSlapState.xml (100%)

diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_getUpgraderSignature.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_getUpgraderSignature.xml
index f6df52ce9..a296890ca 100644
--- a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_getUpgraderSignature.xml
+++ b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_getUpgraderSignature.xml
@@ -67,64 +67,80 @@ ALARM_DICT = {\n
 }\n
 \n
 REQUIRED_BT5_ID_LIST = (\n
+# core of core\n
+  \'erp5_mysql_innodb_catalog\',\n
   \'erp5_core\',\n
   \'erp5_property_sheets\',\n
   \'erp5_xhtml_style\',\n
+# erp5\n
   \'erp5_base\',\n
-  \'erp5_jquery_ui\',\n
-  \'erp5_rss_style\',\n
   \'erp5_accounting\',\n
-  \'erp5_credential\',\n
   \'erp5_crm\',\n
-  \'erp5_open_trade\',\n
-  \'erp5_payzen_secure_payment\',\n
+  \'erp5_accounting_l10n_fr\',\n
+  \'erp5_dms\',\n
+  \'erp5_computer_immobilisation\',\n
+  \'erp5_credential\',\n
+  \'erp5_discount_resource\',\n
+  \'erp5_commerce\',\n
+  \'erp5_pdm\',\n
+  \'erp5_knowledge_pad\',\n
+  \'erp5_forge\',\n
+  \'erp5_legacy_tax_system\',\n
+  \'erp5_invoicing\',\n
+  \'erp5_ingestion\',\n
+  \'erp5_item\',\n
+  \'erp5_km\'\n
+  \'erp5_simulation\',\n
+  \'erp5_trade\',\n
+  \'erp5_ui_test_core\',\n
+  \'erp5_tax_resource\',\n
+  \'erp5_system_event\',\n
+  \'erp5_ui_test\',\n
+  \'erp5_secure_payment\',\n
   \'erp5_web\',\n
-  \'erp5_bearer_token\',\n
-  \'vifib_slapos_core\',\n
+  \'erp5_project\',\n
+  \'erp5_credential_oauth2\',\n
+# vifib\n
   \'vifib_base\',\n
-  \'vifib_mysql_innodb_catalog\',\n
-  \'vifib_forge_release\',\n
-  \'vifib_open_trade\',\n
-  \'vifib_slap\',\n
-  \'vifib_software_pdm\',\n
+  \'vifib_slapos_core\',\n
   \'vifib_web\',\n
-  \'vifib_payzen\',\n
-  \'vifib_web_ui_test\',\n
+  \'vifib_slap\',\n
   \'vifib_agent\',\n
-  \'vifib_data\',\n
-  \'vifib_data_web\',\n
   \'vifib_slapos_accounting\',\n
   \'vifib_erp5\',\n
+  \'vifib_web_ui_test\',\n
+  \'vifib_data_web\',\n
+  \'vifib_data_simulation\',\n
 )\n
 \n
 REINSTALLABLE_BT5_ID_LIST = ()\n
 \n
 # items to keep even if marked by BT5 to \'Remove\'\n
 KEEP_ORIGINAL_DICT = {\n
-  \'vifib_base\': (\n
-    \'software_instance_module\',\n
-    \'portal_types/Slave Instance\',\n
-    \'portal_types/Software Instance\',\n
-    \'portal_types/Software Instance Module\',\n
-    \'allowed_content_types/Software Instance Module\',\n
-    \'base_category_list/Slave Instance\',\n
-    \'base_category_list/Software Instance\',\n
-    \'base_category_list/Software Instance Module\',\n
-    \'property_sheet_list/Slave Instance\',\n
-    \'property_sheet_list/Software Instance\',\n
-    \'property_sheet_list/Item\',\n
-    \'portal_workflow/software_instance_slap_interface_workflow\',\n
-  ),\n
-  \'vifib_open_trade\': (\n
-    \'hosting_subscription_module\',\n
-    \'portal_types/Hosting Subscription\',\n
-    \'portal_types/Hosting Subscription Module\',\n
-    \'property_sheet_list/Hosting Subscription\',\n
-    \'allowed_content_types/Hosting Subscription Module\',\n
-    \'base_category_list/Hosting Subscription\',\n
-    \'base_category_list/Hosting Subscription Module\',\n
-    \'portal_type_workflow_chain/Hosting Subscription\',\n
-  ),\n
+#  \'vifib_base\': (\n
+#    \'software_instance_module\',\n
+#    \'portal_types/Slave Instance\',\n
+#    \'portal_types/Software Instance\',\n
+#    \'portal_types/Software Instance Module\',\n
+#    \'allowed_content_types/Software Instance Module\',\n
+#    \'base_category_list/Slave Instance\',\n
+#    \'base_category_list/Software Instance\',\n
+#    \'base_category_list/Software Instance Module\',\n
+#    \'property_sheet_list/Slave Instance\',\n
+#    \'property_sheet_list/Software Instance\',\n
+#    \'property_sheet_list/Item\',\n
+#    \'portal_workflow/software_instance_slap_interface_workflow\',\n
+#  ),\n
+#  \'vifib_open_trade\': (\n
+#    \'hosting_subscription_module\',\n
+#    \'portal_types/Hosting Subscription\',\n
+#    \'portal_types/Hosting Subscription Module\',\n
+#    \'property_sheet_list/Hosting Subscription\',\n
+#    \'allowed_content_types/Hosting Subscription Module\',\n
+#    \'base_category_list/Hosting Subscription\',\n
+#    \'base_category_list/Hosting Subscription Module\',\n
+#    \'portal_type_workflow_chain/Hosting Subscription\',\n
+#  ),\n
 }\n
 \n
 # Items which need validation at upgrade time\n
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208.xml
new file mode 100644
index 000000000..ebfbb61d3
--- /dev/null
+++ b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Folder" module="OFS.Folder"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>vifib_upgrader_before_201208</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/Computer_updateLocalRoles.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/Computer_updateLocalRoles.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/Computer_updateLocalRoles.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/Computer_updateLocalRoles.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_deliverSetupUpdateDelivery.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_deliverSetupUpdateDelivery.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_deliverSetupUpdateDelivery.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_deliverSetupUpdateDelivery.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_garbageCollectHostingSubscription.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_garbageCollectHostingSubscription.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_garbageCollectHostingSubscription.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_garbageCollectHostingSubscription.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_migrateSlapState.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_migrateSlapState.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_migrateSlapState.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_migrateSlapState.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_removeSimulationOrderedSaleOrder.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_removeSimulationOrderedSaleOrder.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_removeSimulationOrderedSaleOrder.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_removeSimulationOrderedSaleOrder.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_updateComputerLocalRoles.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_updateComputerLocalRoles.xml
similarity index 93%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_updateComputerLocalRoles.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_updateComputerLocalRoles.xml
index c864fc2e3..4585cbb8a 100644
--- a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_updateComputerLocalRoles.xml
+++ b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/ERP5Site_updateComputerLocalRoles.xml
@@ -51,6 +51,9 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>portal = context.getPortalObject()\n
+portal.portal_catalog.searchAndActivate(portal_type=\'Computer Partition\', method_id=\'updateLocalRolesOnSecurityGroups\', activate_kw={\'tag\': \'Computer_updateLocalRoles\'})\n
+return "ok"\n
+\n
 portal.portal_catalog.searchAndActivate(portal_type=\'Computer\', method_id=\'Computer_updateLocalRoles\', activate_kw={\'tag\': \'Computer_updateLocalRoles\'})\n
 \n
 portal.computer_module.activate(after_tag=\'Computer_updateLocalRoles\').Folder_reindexAll()\n
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/HostingSubscription_garbageCollectForMigration.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/HostingSubscription_garbageCollectForMigration.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/HostingSubscription_garbageCollectForMigration.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/HostingSubscription_garbageCollectForMigration.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SaleOrder_removeAppliedRuleOnOrdered.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SaleOrder_removeAppliedRuleOnOrdered.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SaleOrder_removeAppliedRuleOnOrdered.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SaleOrder_removeAppliedRuleOnOrdered.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SalePackingListLine_deliver.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SalePackingListLine_deliver.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SalePackingListLine_deliver.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SalePackingListLine_deliver.xml
diff --git a/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SlapDocument_migrateSlapState.xml b/master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SlapDocument_migrateSlapState.xml
similarity index 100%
rename from master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/SlapDocument_migrateSlapState.xml
rename to master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader_before_201208/SlapDocument_migrateSlapState.xml
diff --git a/master/bt5/vifib_upgrader/bt/revision b/master/bt5/vifib_upgrader/bt/revision
index 1bda76065..8d9f781b5 100644
--- a/master/bt5/vifib_upgrader/bt/revision
+++ b/master/bt5/vifib_upgrader/bt/revision
@@ -1 +1 @@
-117
\ No newline at end of file
+118
\ No newline at end of file
diff --git a/master/bt5/vifib_upgrader/bt/template_skin_id_list b/master/bt5/vifib_upgrader/bt/template_skin_id_list
index 6615afed3..8256c75d2 100644
--- a/master/bt5/vifib_upgrader/bt/template_skin_id_list
+++ b/master/bt5/vifib_upgrader/bt/template_skin_id_list
@@ -1,2 +1,3 @@
 vifib_upgrader
-vifib_upgrader_20120423
\ No newline at end of file
+vifib_upgrader_20120423
+vifib_upgrader_before_201208
\ No newline at end of file
-- 
2.30.9