mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
setup: Disable install/upgrade when dpkg/apt is running
Show a warning message that a package manager is running. This prevents users from getting an installation error just because another installation/upgrade is running. Closes: #625.
This commit is contained in:
1 parent
6a53dd015e
commit
76a63d102b
5 files changed
+49
-17
No files matched your search
@@ -84,11 +84,10 @@ class UpgradesConfigurationView(FormView):
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
|
||||
def is_package_manager_busy():
|
||||
"""Return whether a package manager is running."""
|
||||
try:
|
||||
actions.superuser_run('upgrades', ['is-package-manager-busy'])
|
||||
actions.superuser_run('packages', ['is-package-manager-busy'])
|
||||
return True
|
||||
except actions.ActionError:
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user