From a821517e9172d1ba6c136c28b32dbbcb76a93cf0 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 11 Feb 2019 14:05:44 -0800 Subject: [PATCH] radicale: Simplify upgrading to newer packages Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- actions/radicale | 14 -------------- plinth/modules/radicale/__init__.py | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/actions/radicale b/actions/radicale index 6b4c4a7bd..e2e5fd52d 100755 --- a/actions/radicale +++ b/actions/radicale @@ -99,20 +99,6 @@ def subcommand_migrate(_): action_utils.webserver_disable('radicale-plinth') - aug = load_augeas() - - # Revert the config to package's original. - aug.remove('/files' + DEFAULT_FILE + '/ENABLE_RADICALE') - aug.remove('/files' + CONFIG_FILE + '/server/hosts') - aug.remove('/files' + CONFIG_FILE + '/server/base_prefix') - aug.remove('/files' + CONFIG_FILE + '/well-known/caldav') - aug.remove('/files' + CONFIG_FILE + '/well-known/carddav') - aug.remove('/files' + CONFIG_FILE + '/auth/type') - if current_version and current_version < radicale.VERSION_2: - aug.remove('/files' + CONFIG_FILE + '/rights/type') - - aug.save() - def subcommand_configure(arguments): """Sets the radicale rights type to a particular value""" diff --git a/plinth/modules/radicale/__init__.py b/plinth/modules/radicale/__init__.py index 92e30e15b..e80670775 100644 --- a/plinth/modules/radicale/__init__.py +++ b/plinth/modules/radicale/__init__.py @@ -97,7 +97,7 @@ def setup(helper, old_version=None): # Try to upgrade radicale 1.x to 2.x. helper.call('pre', actions.superuser_run, 'radicale', ['migrate']) - helper.install(managed_packages) + helper.install(managed_packages, force_configuration='new') # Check that radicale 2.x is installed. current_version = get_package_version()