mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
34f74a285f
commit
975dfca7ad
@ -422,7 +422,9 @@ def _perform_dist_upgrade():
|
||||
|
||||
# Hold packages known to have conffile prompts. FreedomBox service
|
||||
# will handle their upgrade later.
|
||||
packages_with_prompts = ['firewalld', 'mumble-server', 'radicale']
|
||||
packages_with_prompts = [
|
||||
'firewalld', 'mumble-server', 'radicale', 'roundcube-core'
|
||||
]
|
||||
print(
|
||||
'Holding packages with conffile prompts: ' +
|
||||
', '.join(packages_with_prompts) + '...', flush=True)
|
||||
|
||||
@ -11,6 +11,7 @@ from plinth import frontpage, menu
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.utils import Version
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -89,3 +90,18 @@ def setup(helper, old_version=None):
|
||||
helper.install(managed_packages)
|
||||
helper.call('post', actions.superuser_run, 'roundcube', ['setup'])
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user