mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
apt: Run dpkg --configure -a before other actions
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
5424e1e23f
commit
0f54fab067
@ -94,6 +94,7 @@ def subcommand_install(arguments):
|
||||
elif arguments.force_configuration == 'new':
|
||||
extra_arguments += ['-o', 'Dpkg::Options::=--force-confnew']
|
||||
|
||||
subprocess.run(['dpkg', '--configure', '-a'])
|
||||
with _apt_hold():
|
||||
run_apt_command(['--fix-broken', 'install'])
|
||||
returncode = run_apt_command(['install'] + extra_arguments +
|
||||
|
||||
@ -84,6 +84,7 @@ def parse_arguments():
|
||||
|
||||
def subcommand_run(_):
|
||||
"""Run unattended-upgrades"""
|
||||
subprocess.run(['dpkg', '--configure', '-a'])
|
||||
run_apt_command(['--fix-broken', 'install'])
|
||||
try:
|
||||
subprocess.Popen(['systemctl', 'start', 'freedombox-manual-upgrade'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user