-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2016-01-06T13:34:23+01:00 Author: Philip Bauer (pbauer) <bauer@starzel.de> Commit: plone/plone.app.upgrade@3bcedea Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2. (and pep8) Files changed: M CHANGES.rst M plone/app/upgrade/v50/betas.py M plone/app/upgrade/v50/configure.zcml M plone/app/upgrade/v50/final.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2016-01-08T07:43:42+01:00 Author: Philip Bauer (pbauer) <bauer@starzel.de> Commit: plone/plone.app.upgrade@5512fa2 Merge pull request #64 from plone/upgrade_querystring Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2 Files changed: M CHANGES.rst M plone/app/upgrade/v50/betas.py M plone/app/upgrade/v50/configure.zcml M plone/app/upgrade/v50/final.py
- Loading branch information
Showing
1 changed file
with
239 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,259 @@ | ||
Repository: Products.CMFPlone | ||
Repository: plone.app.upgrade | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2016-01-06T13:36:20+01:00 | ||
Date: 2016-01-06T13:34:23+01:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/aa6fd5085db9dead5cb84858d6d2a0134ff7a639 | ||
Commit: https://github.com/plone/plone.app.upgrade/commit/3bcedea5f351a58b4f080918b28f4cd5b5398343 | ||
|
||
bump profile-version | ||
Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2. | ||
(and pep8) | ||
|
||
Files changed: | ||
M Products/CMFPlone/profiles/default/metadata.xml | ||
M CHANGES.rst | ||
M plone/app/upgrade/v50/betas.py | ||
M plone/app/upgrade/v50/configure.zcml | ||
M plone/app/upgrade/v50/final.py | ||
|
||
diff --git a/Products/CMFPlone/profiles/default/metadata.xml b/Products/CMFPlone/profiles/default/metadata.xml | ||
index cc465b9..008b5de 100644 | ||
--- a/Products/CMFPlone/profiles/default/metadata.xml | ||
+++ b/Products/CMFPlone/profiles/default/metadata.xml | ||
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<metadata> | ||
- <version>5012</version> | ||
+ <version>5013</version> | ||
</metadata> | ||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 8f1372b..4c2c3d7 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -4,7 +4,8 @@ Changelog | ||
1.3.20 (unreleased) | ||
------------------- | ||
|
||
-- Nothing changed yet. | ||
+- Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2. | ||
+ [pbauer] | ||
|
||
|
||
1.3.19 (2015-12-17) | ||
@@ -15,8 +16,8 @@ New: | ||
- reapply profile for site-controlpanel | ||
plone/Products.CMFPlone#124 | ||
[fgrcon] | ||
- | ||
-- extended step to501 to recreate metadata for getIcon, see | ||
+ | ||
+- extended step to501 to recreate metadata for getIcon, see | ||
plone/Products.CMFPlone#1226, #58, #60, #61 | ||
[fgrcon, gagaro, jensens] | ||
|
||
diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py | ||
index c0dbd3a..e7eff8b 100644 | ||
--- a/plone/app/upgrade/v50/betas.py | ||
+++ b/plone/app/upgrade/v50/betas.py | ||
@@ -59,17 +59,17 @@ def upgrade_portal_language(context): | ||
lang_settings.use_combined_language_codes = portal_languages.use_combined_language_codes # noqa | ||
lang_settings.display_flags = portal_languages.display_flags | ||
|
||
- lang_settings.use_path_negotiation = portal_languages.use_path_negotiation | ||
- lang_settings.use_content_negotiation = portal_languages.use_content_negotiation | ||
- lang_settings.use_cookie_negotiation = portal_languages.use_cookie_negotiation | ||
+ lang_settings.use_path_negotiation = portal_languages.use_path_negotiation # noqa | ||
+ lang_settings.use_content_negotiation = portal_languages.use_content_negotiation # noqa | ||
+ lang_settings.use_cookie_negotiation = portal_languages.use_cookie_negotiation # noqa | ||
if hasattr(portal_languages, 'set_cookie_everywhere'): | ||
- lang_settings.set_cookie_always = portal_languages.set_cookie_everywhere | ||
- lang_settings.authenticated_users_only = portal_languages.authenticated_users_only | ||
- lang_settings.use_request_negotiation = portal_languages.use_request_negotiation | ||
- lang_settings.use_cctld_negotiation = portal_languages.use_cctld_negotiation | ||
+ lang_settings.set_cookie_always = portal_languages.set_cookie_everywhere # noqa | ||
+ lang_settings.authenticated_users_only = portal_languages.authenticated_users_only # noqa | ||
+ lang_settings.use_request_negotiation = portal_languages.use_request_negotiation # noqa | ||
+ lang_settings.use_cctld_negotiation = portal_languages.use_cctld_negotiation # noqa | ||
lang_settings.use_subdomain_negotiation = portal_languages.use_subdomain_negotiation # noqa | ||
if hasattr(portal_languages, 'always_show_selector'): | ||
- lang_settings.always_show_selector = portal_languages.always_show_selector | ||
+ lang_settings.always_show_selector = portal_languages.always_show_selector # noqa | ||
|
||
# Remove the old tool | ||
portal.manage_delObjects('portal_languages') | ||
diff --git a/plone/app/upgrade/v50/configure.zcml b/plone/app/upgrade/v50/configure.zcml | ||
index ee73c59..b1bc42b 100644 | ||
--- a/plone/app/upgrade/v50/configure.zcml | ||
+++ b/plone/app/upgrade/v50/configure.zcml | ||
@@ -270,4 +270,18 @@ | ||
handler=".final.to501" | ||
/> | ||
</gs:upgradeSteps> | ||
+ | ||
+ <gs:upgradeSteps | ||
+ source="5012" | ||
+ destination="5013" | ||
+ profile="Products.CMFPlone:plone"> | ||
+ | ||
+ <gs:upgradeStep | ||
+ title="Run to502 upgrade profile." | ||
+ description="" | ||
+ handler=".final.to502" | ||
+ /> | ||
+ | ||
+ </gs:upgradeSteps> | ||
+ | ||
</configure> | ||
diff --git a/plone/app/upgrade/v50/final.py b/plone/app/upgrade/v50/final.py | ||
index 01beec8..ffd33e4 100644 | ||
--- a/plone/app/upgrade/v50/final.py | ||
+++ b/plone/app/upgrade/v50/final.py | ||
@@ -1,6 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.upgrade.utils import loadMigrationProfile | ||
-from plone.dexterity.interfaces import IDexterityContent | ||
from plone.registry.interfaces import IRegistry | ||
from Products.CMFCore.utils import getToolByName | ||
from Products.CMFPlone.utils import safe_unicode | ||
@@ -65,7 +64,6 @@ def refresh_getIcon_catalog_metadata(context): | ||
logger.info('`getIcon` not in metadata, skip upgrade step') | ||
return | ||
|
||
- | ||
cnt = 0 | ||
# search whole catalog | ||
for brain in zcatalog.unrestrictedSearchResults(): | ||
@@ -83,3 +81,12 @@ def refresh_getIcon_catalog_metadata(context): | ||
logger.info('Reindexed `getIcon` for %s items' % str(cnt)) | ||
|
||
refresh_getIcon_catalog_metadata(context) | ||
+ | ||
+ | ||
+def to502(context): | ||
+ """5.0.1 -> 5.0.2""" | ||
+ | ||
+ # When migrating from Plone 4.3 to 5.0 the profile-version of | ||
+ # plone.app.querystring is 13 at this point but the upgrade-step | ||
+ # upgrade_to_5 has not been run. Let's run it. | ||
+ loadMigrationProfile(context, 'profile-plone.app.querystring:upgrade_to_5') | ||
|
||
|
||
Repository: Products.CMFPlone | ||
Repository: plone.app.upgrade | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2016-01-08T07:43:22+01:00 | ||
Date: 2016-01-08T07:43:42+01:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/f91f45a9ff74f2776f4b518c507e8e589b563e0d | ||
Commit: https://github.com/plone/plone.app.upgrade/commit/5512fa20813ae0959aea23df0cb44f86e2f6f7af | ||
|
||
Merge pull request #1308 from plone/bump_profile | ||
Merge pull request #64 from plone/upgrade_querystring | ||
|
||
bump profile-version | ||
Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2 | ||
|
||
Files changed: | ||
M Products/CMFPlone/profiles/default/metadata.xml | ||
|
||
diff --git a/Products/CMFPlone/profiles/default/metadata.xml b/Products/CMFPlone/profiles/default/metadata.xml | ||
index cc465b9..008b5de 100644 | ||
--- a/Products/CMFPlone/profiles/default/metadata.xml | ||
+++ b/Products/CMFPlone/profiles/default/metadata.xml | ||
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<metadata> | ||
- <version>5012</version> | ||
+ <version>5013</version> | ||
</metadata> | ||
M CHANGES.rst | ||
M plone/app/upgrade/v50/betas.py | ||
M plone/app/upgrade/v50/configure.zcml | ||
M plone/app/upgrade/v50/final.py | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 8f1372b..4c2c3d7 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -4,7 +4,8 @@ Changelog | ||
1.3.20 (unreleased) | ||
------------------- | ||
|
||
-- Nothing changed yet. | ||
+- Run missing upgrade-step of plone.app.querystring when upgrading to 5.0.2. | ||
+ [pbauer] | ||
|
||
|
||
1.3.19 (2015-12-17) | ||
@@ -15,8 +16,8 @@ New: | ||
- reapply profile for site-controlpanel | ||
plone/Products.CMFPlone#124 | ||
[fgrcon] | ||
- | ||
-- extended step to501 to recreate metadata for getIcon, see | ||
+ | ||
+- extended step to501 to recreate metadata for getIcon, see | ||
plone/Products.CMFPlone#1226, #58, #60, #61 | ||
[fgrcon, gagaro, jensens] | ||
|
||
diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py | ||
index c0dbd3a..e7eff8b 100644 | ||
--- a/plone/app/upgrade/v50/betas.py | ||
+++ b/plone/app/upgrade/v50/betas.py | ||
@@ -59,17 +59,17 @@ def upgrade_portal_language(context): | ||
lang_settings.use_combined_language_codes = portal_languages.use_combined_language_codes # noqa | ||
lang_settings.display_flags = portal_languages.display_flags | ||
|
||
- lang_settings.use_path_negotiation = portal_languages.use_path_negotiation | ||
- lang_settings.use_content_negotiation = portal_languages.use_content_negotiation | ||
- lang_settings.use_cookie_negotiation = portal_languages.use_cookie_negotiation | ||
+ lang_settings.use_path_negotiation = portal_languages.use_path_negotiation # noqa | ||
+ lang_settings.use_content_negotiation = portal_languages.use_content_negotiation # noqa | ||
+ lang_settings.use_cookie_negotiation = portal_languages.use_cookie_negotiation # noqa | ||
if hasattr(portal_languages, 'set_cookie_everywhere'): | ||
- lang_settings.set_cookie_always = portal_languages.set_cookie_everywhere | ||
- lang_settings.authenticated_users_only = portal_languages.authenticated_users_only | ||
- lang_settings.use_request_negotiation = portal_languages.use_request_negotiation | ||
- lang_settings.use_cctld_negotiation = portal_languages.use_cctld_negotiation | ||
+ lang_settings.set_cookie_always = portal_languages.set_cookie_everywhere # noqa | ||
+ lang_settings.authenticated_users_only = portal_languages.authenticated_users_only # noqa | ||
+ lang_settings.use_request_negotiation = portal_languages.use_request_negotiation # noqa | ||
+ lang_settings.use_cctld_negotiation = portal_languages.use_cctld_negotiation # noqa | ||
lang_settings.use_subdomain_negotiation = portal_languages.use_subdomain_negotiation # noqa | ||
if hasattr(portal_languages, 'always_show_selector'): | ||
- lang_settings.always_show_selector = portal_languages.always_show_selector | ||
+ lang_settings.always_show_selector = portal_languages.always_show_selector # noqa | ||
|
||
# Remove the old tool | ||
portal.manage_delObjects('portal_languages') | ||
diff --git a/plone/app/upgrade/v50/configure.zcml b/plone/app/upgrade/v50/configure.zcml | ||
index ee73c59..b1bc42b 100644 | ||
--- a/plone/app/upgrade/v50/configure.zcml | ||
+++ b/plone/app/upgrade/v50/configure.zcml | ||
@@ -270,4 +270,18 @@ | ||
handler=".final.to501" | ||
/> | ||
</gs:upgradeSteps> | ||
+ | ||
+ <gs:upgradeSteps | ||
+ source="5012" | ||
+ destination="5013" | ||
+ profile="Products.CMFPlone:plone"> | ||
+ | ||
+ <gs:upgradeStep | ||
+ title="Run to502 upgrade profile." | ||
+ description="" | ||
+ handler=".final.to502" | ||
+ /> | ||
+ | ||
+ </gs:upgradeSteps> | ||
+ | ||
</configure> | ||
diff --git a/plone/app/upgrade/v50/final.py b/plone/app/upgrade/v50/final.py | ||
index 01beec8..ffd33e4 100644 | ||
--- a/plone/app/upgrade/v50/final.py | ||
+++ b/plone/app/upgrade/v50/final.py | ||
@@ -1,6 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.upgrade.utils import loadMigrationProfile | ||
-from plone.dexterity.interfaces import IDexterityContent | ||
from plone.registry.interfaces import IRegistry | ||
from Products.CMFCore.utils import getToolByName | ||
from Products.CMFPlone.utils import safe_unicode | ||
@@ -65,7 +64,6 @@ def refresh_getIcon_catalog_metadata(context): | ||
logger.info('`getIcon` not in metadata, skip upgrade step') | ||
return | ||
|
||
- | ||
cnt = 0 | ||
# search whole catalog | ||
for brain in zcatalog.unrestrictedSearchResults(): | ||
@@ -83,3 +81,12 @@ def refresh_getIcon_catalog_metadata(context): | ||
logger.info('Reindexed `getIcon` for %s items' % str(cnt)) | ||
|
||
refresh_getIcon_catalog_metadata(context) | ||
+ | ||
+ | ||
+def to502(context): | ||
+ """5.0.1 -> 5.0.2""" | ||
+ | ||
+ # When migrating from Plone 4.3 to 5.0 the profile-version of | ||
+ # plone.app.querystring is 13 at this point but the upgrade-step | ||
+ # upgrade_to_5 has not been run. Let's run it. | ||
+ loadMigrationProfile(context, 'profile-plone.app.querystring:upgrade_to_5') | ||
|
||
|