Apt cache prompts at fresh install and locales issue (#3158)

* Apt cache prompts at fresh install
* Some Ubuntu variants comes without default locales
This commit is contained in:
Igor Pečovnik
2021-09-24 21:10:24 +02:00
committed by GitHub
parent 7dfc3e34f6
commit 9653d8c780

View File

@@ -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