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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2020-09-11 10:55:49 -04:00
1 parent ff4b4414fd
commit 271f88d9ed
1 file changed
+6 -1
+6 -1
View File
@@ -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)