ensure_packages_installed fix

This commit is contained in:
clore 2025-01-03 16:40:47 +00:00
parent a9d57c18ae
commit 777365adf8
1 changed files with 4 additions and 9 deletions

View File

@ -36,9 +36,7 @@ async def ensure_packages_installed(
return True return True
update_cmd = ( update_cmd = (
"apt-get update" "apt-get update -y --no-install-recommends"
"-y"
"--no-install-recommends"
) )
return_code, stdout, stderr = await utils.async_run_command( return_code, stdout, stderr = await utils.async_run_command(
update_cmd, update_cmd,
@ -55,12 +53,9 @@ async def ensure_packages_installed(
return False return False
install_cmd = ( install_cmd = (
"apt-get install" "apt-get install -y --no-install-recommends --assume-yes "+
"-y" "-o Dpkg::Options::='--force-confdef' "+ # Default to existing config
"--no-install-recommends" "-o Dpkg::Options::='--force-confold' "+ # Keep existing config
"--assume-yes"
"-o Dpkg::Options::='--force-confdef'" # Default to existing config
"-o Dpkg::Options::='--force-confold'" # Keep existing config
f"{' '.join(packages_to_install)}" f"{' '.join(packages_to_install)}"
) )