From 78278405ceb0e0d05eafc1eab2ef27a18463c1fd Mon Sep 17 00:00:00 2001 From: Igor Belikov Date: Thu, 28 Jan 2016 16:28:58 +0300 Subject: [PATCH] Fix debian-minimal image building 'locales' package gets installed before '12-debian-locale-gen' is executed and generates effectively empty /etc/locales.gen in debian, which makes dpkg-reconfigure call to locales ignore the values set by debconf-set-selections. * Remove /etc/locale.gen generated by 'locales' installation to ensure proper locales generation on debian images * Remove 'locales-all' package installation from debian element since it's not needed anymore to build the image and cosnumes additional ~120MB of space * Remove unused 'package-installs' dependency from debian-minimal element Change-Id: Ic39ba2b5ceb5018efb75742547b2babf80827e56 Closes-Bug: #1452400 --- elements/debian-minimal/element-deps | 1 - elements/debian/package-installs.yaml | 1 - elements/debootstrap/install.d/12-debian-locale-gen | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/debian-minimal/element-deps b/elements/debian-minimal/element-deps index e078fde1..cba86060 100644 --- a/elements/debian-minimal/element-deps +++ b/elements/debian-minimal/element-deps @@ -1,2 +1 @@ debootstrap -package-installs diff --git a/elements/debian/package-installs.yaml b/elements/debian/package-installs.yaml index b36f3da7..862c274f 100644 --- a/elements/debian/package-installs.yaml +++ b/elements/debian/package-installs.yaml @@ -10,4 +10,3 @@ net-tools: cloud-init: cloud-utils: cloud-initramfs-growroot: -locales-all: diff --git a/elements/debootstrap/install.d/12-debian-locale-gen b/elements/debootstrap/install.d/12-debian-locale-gen index 5b0d450d..24773e89 100755 --- a/elements/debootstrap/install.d/12-debian-locale-gen +++ b/elements/debootstrap/install.d/12-debian-locale-gen @@ -21,6 +21,8 @@ fi set -eu set -o pipefail +[ -f /etc/locale.gen ] && rm /etc/locale.gen + debconf-set-selections - <