mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
upgrades: Allow grub-pc upgrade without reinstalling grub
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
6665052fe8
commit
092c7e70d1
@ -11,7 +11,8 @@ import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from plinth.action_utils import apt_hold, run_apt_command, service_restart
|
||||
from plinth.action_utils import (apt_hold, debconf_set_selections,
|
||||
run_apt_command, service_restart)
|
||||
from plinth.modules.apache.components import check_url
|
||||
from plinth.modules.upgrades import (BACKPORTS_SOURCES_LIST, SOURCES_LIST,
|
||||
get_current_release, is_backports_current)
|
||||
@ -392,7 +393,12 @@ def _perform_dist_upgrade():
|
||||
run_apt_command(['install', 'base-files'])
|
||||
run_apt_command(['install', 'unattended-upgrades'])
|
||||
|
||||
print('Running unattended-upgrade...')
|
||||
# Tell grub-pc to continue without installing grub again.
|
||||
print('Set grub-pc to not require re-installing grub...', flush=True)
|
||||
debconf_set_selections(
|
||||
['grub-pc grub-pc/install_devices_empty boolean true'])
|
||||
|
||||
print('Running unattended-upgrade...', flush=True)
|
||||
subprocess.run(['unattended-upgrade', '--verbose'])
|
||||
|
||||
# Remove obsolete packages that may prevent other packages from
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user