Browse Source

Reconfigure locales noninteractively

blueprint: mos-xenial

Change-Id: I9f90fcd8c1e76abfbac7b947c053e991780d304e
Dmitry Teselkin 3 years ago
parent
commit
5b5f0f0b31
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      sandbox.mk

+ 5
- 1
sandbox.mk View File

@@ -194,7 +194,11 @@ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
194 194
 if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
195 195
 sudo cp /etc/hosts $(SANDBOX_UBUNTU)/etc/hosts
196 196
 echo "Generating utf8 locale"
197
-sudo chroot $(SANDBOX_UBUNTU) /bin/sh -c 'locale-gen en_US.UTF-8; dpkg-reconfigure locales'
197
+sudo chroot $(SANDBOX_UBUNTU) /usr/bin/env -i \
198
+  LC_ALL=C \
199
+  DEBIAN_FRONTEND=noninteractive \
200
+  DEBCONF_NONINTERACTIVE_SEEN=true \
201
+  /bin/sh -c 'locale-gen en_US.UTF-8; dpkg-reconfigure locales'
198 202
 echo "Preparing directory for chroot local mirror"
199 203
 sudo mkdir -p $(SANDBOX_UBUNTU)/etc/apt/preferences.d/
200 204
 echo "Generating pinning file for Ubuntu SandBox"

Loading…
Cancel
Save