mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Use privileged decorator for package actions
Tests: - DONE: Check if package manager is busy works - DONE: Power app shows status in app/restart/shutdown pages - DONE: Upgrades app shows in app page and first boot wizard page - DONE: When attempting force upgrade, busy state results in a back-off - DONE: An app's packages can be installed/uninstalled successfully - DONE: apt update is run before install - DONE: If network is not available during package install, error message is shown - DONE: Filtering packages with configuration file prompts works. Tested with firewall 1.0.3 to 1.2.1. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
9a4905e832
commit
0bda4843a7
6 files changed
+91
-175
No files matched your search
+2
-1
@@ -18,6 +18,7 @@ from plinth.signals import post_setup
|
||||
|
||||
from . import operation as operation_module
|
||||
from . import package
|
||||
from .privileged import packages as packages_privileged
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -418,7 +419,7 @@ class ForceUpgrader():
|
||||
if _is_shutting_down:
|
||||
raise self.PermanentFailure('Service is shutting down')
|
||||
|
||||
if package.is_package_manager_busy():
|
||||
if packages_privileged.is_package_manager_busy():
|
||||
raise self.TemporaryFailure('Package manager is busy')
|
||||
|
||||
apps = self._get_list_of_apps_to_force_upgrade()
|
||||
|
||||
Reference in new issue
Block a user