roundcube: Allow upgrade to 1.4.*

Hold roundcube during dist upgrade.

Closes: #2035.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2021-02-03 19:05:28 -05:00 committed by Sunil Mohan Adapa
parent 34f74a285f
commit 975dfca7ad
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 19 additions and 1 deletions

View File

@ -422,7 +422,9 @@ def _perform_dist_upgrade():
# Hold packages known to have conffile prompts. FreedomBox service # Hold packages known to have conffile prompts. FreedomBox service
# will handle their upgrade later. # will handle their upgrade later.
packages_with_prompts = ['firewalld', 'mumble-server', 'radicale'] packages_with_prompts = [
'firewalld', 'mumble-server', 'radicale', 'roundcube-core'
]
print( print(
'Holding packages with conffile prompts: ' + 'Holding packages with conffile prompts: ' +
', '.join(packages_with_prompts) + '...', flush=True) ', '.join(packages_with_prompts) + '...', flush=True)

View File

@ -11,6 +11,7 @@ from plinth import frontpage, menu
from plinth.modules.apache.components import Webserver from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall from plinth.modules.firewall.components import Firewall
from plinth.utils import Version
from . import manifest from . import manifest
@ -89,3 +90,18 @@ def setup(helper, old_version=None):
helper.install(managed_packages) helper.install(managed_packages)
helper.call('post', actions.superuser_run, 'roundcube', ['setup']) helper.call('post', actions.superuser_run, 'roundcube', ['setup'])
helper.call('post', app.enable) helper.call('post', app.enable)
def force_upgrade(helper, packages):
"""Force upgrade package to resolve conffile prompts."""
if 'roundcube-core' not in packages:
return False
# Allow roundcube any lower version to upgrade to 1.4.*
package = packages['roundcube-core']
if Version(package['new_version']) > Version('1.5~'):
return False
helper.install(['roundcube-core'], force_configuration='new')
actions.superuser_run('roundcube', ['setup'])
return True