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:
James Valleroy authored and Sunil Mohan Adapa committed 2020-06-25 11:54:55 -07:00
1 parent 5424e1e23f
commit 0f54fab067
2 files changed
+2

No files matched your search

+1
View File
@@ -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 +
+1
View File
@@ -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'],