From 271f88d9edc08554aec766c3260adca933557a83 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 8 Sep 2020 15:53:03 -0700 Subject: [PATCH] backports: When upgrading from older version, assumed requested - This helps the case where an user installs FreedomBox on Buster and then after finishing the first boot wizard and before repositories have been setup, upgrades to latest FreedomBox version. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/upgrades/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index 4d733a361..5ae2c85f3 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -18,7 +18,7 @@ from plinth import cfg, glib, menu from .manifest import backup # noqa, pylint: disable=unused-import -version = 6 +version = 7 is_essential = True @@ -119,6 +119,11 @@ def setup(helper, old_version=None): # increment. helper.call('post', actions.superuser_run, 'upgrades', ['setup']) + # When upgrading from a version without first boot wizard for backports, + # assume backports have been requested. + if old_version and old_version < 7: + set_backports_requested(can_activate_backports()) + # Try to setup apt repositories, if needed, if possible, on first install # and on version increment. helper.call('post', setup_repositories, None)