From 4afcfb5e3c9701dd34cc9f1fdb8fcf778b9273b7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 5 Apr 2017 18:42:32 +0200 Subject: Consistently using '--force-confnew' as dpkg option when upgrading or installing packages. Signed-off-by: Daniel Baumann --- share/scripts/debconf | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/share/scripts/debconf b/share/scripts/debconf index df9241c..e4c342e 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -168,8 +168,8 @@ EOF # Upgrade system Chroot "${DIRECTORY}" "apt-get update" - Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true upgrade" - Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true dist-upgrade" + Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true --option Dpkg::Options::=--force-confnew upgrade" + Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true --option Dpkg::Options::=--force-confnew dist-upgrade" # Install systemd support packages Chroot "${DIRECTORY}" "apt-get --yes install dbus libpam-systemd systemd-sysv" @@ -704,15 +704,7 @@ EOF # Workaround: We're running lxc-support at the end of the template again. if [ -n "${PACKAGES}" ] then - case "${DEBCONF_FRONTEND}" in - noninteractive) - Chroot "${DIRECTORY}" apt-get --option APT::Force-LoopBreak=true --option Dpkg::Options::="--force-overwrite" --option Dpkg::Options::="--force-confold" --yes install ${PACKAGES} - ;; - - *) - Chroot "${DIRECTORY}" "apt-get --option APT::Force-LoopBreak=true --yes install ${PACKAGES}" - ;; - esac + Chroot "${DIRECTORY}" "apt-get --option APT::Force-LoopBreak=true --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}" fi # Manual hack to regenerate ssh keys -- cgit v1.2.3