From b9db2df54afe16fdcf149fb0d2aeb1d4b18659ef Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Mon, 13 Sep 2021 12:20:56 +0200 Subject: [PATCH 1/3] Add plone.app.caching to the list of add-ons that is upgraded when upgrading Plone. In PR https://github.com/plone/plone.app.caching/pull/83 I add the first upgrade step. --- Products/CMFPlone/MigrationTool.py | 1 + news/82.bugfix | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 news/82.bugfix diff --git a/Products/CMFPlone/MigrationTool.py b/Products/CMFPlone/MigrationTool.py index a7bf17b886..67522782d8 100644 --- a/Products/CMFPlone/MigrationTool.py +++ b/Products/CMFPlone/MigrationTool.py @@ -88,6 +88,7 @@ def upgrade_all(self, context): ADDON_LIST = AddonList([ Addon(profile_id='Products.CMFEditions:CMFEditions'), Addon(profile_id='Products.CMFPlacefulWorkflow:CMFPlacefulWorkflow'), + Addon(profile_id='plone.app.caching:default'), Addon(profile_id='plone.app.contenttypes:default'), Addon(profile_id='plone.app.dexterity:default'), Addon(profile_id='plone.app.discussion:default'), diff --git a/news/82.bugfix b/news/82.bugfix new file mode 100644 index 0000000000..53ab366c9b --- /dev/null +++ b/news/82.bugfix @@ -0,0 +1,2 @@ +Add ``plone.app.caching`` to the list of add-ons that is upgraded when upgrading Plone. +[maurits] From 85c4e7cd0dbabb792fc4a5c387c5f415e846db86 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Mon, 13 Sep 2021 20:01:52 +0200 Subject: [PATCH 2/3] Addon list for upgrade: check if we can import non-standard packages. CMFPlacefulWorkflow, plone.app.caching, and plone.app.iterate are not dependencies of CMFPlone, but of Plone, so not all sites will have them. This avoids a GenericSetup warning. See https://github.com/plone/Products.CMFPlone/pull/3311#discussion_r707343362 --- Products/CMFPlone/MigrationTool.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Products/CMFPlone/MigrationTool.py b/Products/CMFPlone/MigrationTool.py index 67522782d8..456f1d9998 100644 --- a/Products/CMFPlone/MigrationTool.py +++ b/Products/CMFPlone/MigrationTool.py @@ -85,15 +85,26 @@ def upgrade_all(self, context): # List of upgradeable packages. Obvious items to add here, are all # core packages that actually have upgrade steps. # Good start is portal_setup.listProfilesWithUpgrades() +# Please use 'check_module' for packages that are not direct dependencies +# of Products.CMFPlone, but of the Plone package. ADDON_LIST = AddonList([ Addon(profile_id='Products.CMFEditions:CMFEditions'), - Addon(profile_id='Products.CMFPlacefulWorkflow:CMFPlacefulWorkflow'), - Addon(profile_id='plone.app.caching:default'), + Addon( + profile_id='Products.CMFPlacefulWorkflow:CMFPlacefulWorkflow', + check_module='Products.CMFPlacefulWorkflow' + ), + Addon( + profile_id='plone.app.caching:default', + check_module='plone.app.caching' + ), Addon(profile_id='plone.app.contenttypes:default'), Addon(profile_id='plone.app.dexterity:default'), Addon(profile_id='plone.app.discussion:default'), Addon(profile_id='plone.app.event:default'), - Addon(profile_id='plone.app.iterate:plone.app.iterate'), + Addon( + profile_id='plone.app.iterate:plone.app.iterate', + check_module='plone.app.iterate' + ), Addon(profile_id='plone.app.multilingual:default'), Addon(profile_id='plone.app.querystring:default'), Addon(profile_id='plone.app.theming:default'), From 1128832b34521a36eda68d95a4d54bff27e605d2 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Mon, 13 Sep 2021 20:02:53 +0200 Subject: [PATCH 3/3] Addon list for upgrade: try to upgrade default profile of plone.app.iterate. This package at the moment still has a profile called plone.app.iterate. In 3.1.5 (used since Plone 5.0.3), the default profile was added. The old name is kept for compatibility until now, but should be removed. Perhaps this may need an upgrade step in plone.app.iterate for people who used the old name. But with the old name in the addon list, `plone.app.iterate:default` was never upgraded automatically. --- Products/CMFPlone/MigrationTool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/CMFPlone/MigrationTool.py b/Products/CMFPlone/MigrationTool.py index 456f1d9998..9dca5b740c 100644 --- a/Products/CMFPlone/MigrationTool.py +++ b/Products/CMFPlone/MigrationTool.py @@ -102,7 +102,7 @@ def upgrade_all(self, context): Addon(profile_id='plone.app.discussion:default'), Addon(profile_id='plone.app.event:default'), Addon( - profile_id='plone.app.iterate:plone.app.iterate', + profile_id='plone.app.iterate:default', check_module='plone.app.iterate' ), Addon(profile_id='plone.app.multilingual:default'),