From 9653d8c780767a3aefe47b5eb0e607c4b454b5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Fri, 24 Sep 2021 21:10:24 +0200 Subject: [PATCH] Apt cache prompts at fresh install and locales issue (#3158) * Apt cache prompts at fresh install * Some Ubuntu variants comes without default locales --- lib/general.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/general.sh b/lib/general.sh index 56f8693cec..fb471e2356 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -1027,7 +1027,12 @@ prepare_host() # wait until package manager finishes possible system maintanace wait_for_package_manager - # temporally fix for Locales settings + # fix for Locales settings + if ! grep -q "^en_US.UTF-8 UTF-8" /etc/locale.gen; then + sudo sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen + sudo locale-gen + fi + export LC_ALL="en_US.UTF-8" # packages list for host @@ -1155,6 +1160,8 @@ prepare_host() if [[ ${#deps[@]} -gt 0 ]]; then display_alert "Installing build dependencies" + # don't prompt for apt cacher selection + sudo echo "apt-cacher-ng apt-cacher-ng/tunnelenable boolean false" | sudo debconf-set-selections apt-get -q update apt-get -y upgrade apt-get -q -y --no-install-recommends install -o Dpkg::Options::='--force-confold' "${deps[@]}" | tee -a "${DEST}"/${LOG_SUBPATH}/hostdeps.log