radicale: Simplify upgrading to newer packages

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-02-11 14:05:44 -08:00 committed by James Valleroy
parent 920d083301
commit a821517e91
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 1 additions and 15 deletions

View File

@ -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"""

View File

@ -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()