diff --git a/plinth/modules/upgrades/distupgrade.py b/plinth/modules/upgrades/distupgrade.py index 576a9213a..50b3db63b 100644 --- a/plinth/modules/upgrades/distupgrade.py +++ b/plinth/modules/upgrades/distupgrade.py @@ -237,10 +237,8 @@ def _snapshot_run_and_disable() -> Generator[None, None, None]: reenable = False try: logger.info('Taking a snapshot before dist upgrade...') - subprocess.run([ - '/usr/share/plinth/actions/actions', 'snapshot', 'create', - '--no-args' - ], check=True) + command = ['snapper', 'create', '--description', 'before dist-upgrade'] + subprocess.run(command, check=True) aug = snapshot_module.load_augeas() if snapshot_module.is_apt_snapshots_enabled(aug): logger.info('Disabling apt snapshots during dist upgrade...') diff --git a/plinth/modules/upgrades/tests/test_distupgrade.py b/plinth/modules/upgrades/tests/test_distupgrade.py index ed3ed8934..57aa8754d 100644 --- a/plinth/modules/upgrades/tests/test_distupgrade.py +++ b/plinth/modules/upgrades/tests/test_distupgrade.py @@ -248,10 +248,8 @@ def test_snapshot_run_and_disable(is_supported, is_apt_snapshots_enabled, run): is_apt_snapshots_enabled.return_value = False with distupgrade._snapshot_run_and_disable(): assert run.call_args_list == [ - call([ - '/usr/share/plinth/actions/actions', 'snapshot', 'create', - '--no-args' - ], check=True) + call(['snapper', 'create', '--description', 'before dist-upgrade'], + check=True) ] run.reset_mock() @@ -261,10 +259,8 @@ def test_snapshot_run_and_disable(is_supported, is_apt_snapshots_enabled, run): is_apt_snapshots_enabled.return_value = True with distupgrade._snapshot_run_and_disable(): assert run.call_args_list == [ - call([ - '/usr/share/plinth/actions/actions', 'snapshot', 'create', - '--no-args' - ], check=True), + call(['snapper', 'create', '--description', 'before dist-upgrade'], + check=True), call([ '/usr/share/plinth/actions/actions', 'snapshot', 'disable_apt_snapshot'