Commit fade719e by Stéphane Graber

lxc-ubuntu: Guess a list of langpacks to install

In addition to creating the current locale in the container, also try to scan the host and extra the list of langpacks installed there, then pass that list to debootstrap as additional packages to install. On distros that don't have dpkg, only language-pack-en will be installed. The code will always ensure that language-pack-en is ALWAYS installed in the target, similar to what Ubuntu does with its various media. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 18f823c1
...@@ -174,6 +174,18 @@ download_ubuntu() ...@@ -174,6 +174,18 @@ download_ubuntu()
release=$3 release=$3
packages=vim,ssh packages=vim,ssh
# Try to guess a list of langpacks to install
langpacks="language-pack-en"
if which dpkg >/dev/null 2>&1; then
langpacks=`(echo $LANGPACK_LIST &&
dpkg -l | grep -E "^ii language-pack-[a-z]* " |
cut -d ' ' -f3) | sort -u`
fi
packages="$packages,$(echo $langpacks | sed 's/ /,/g')"
echo "installing packages: $packages" echo "installing packages: $packages"
trap cleanup EXIT SIGHUP SIGINT SIGTERM trap cleanup EXIT SIGHUP SIGINT SIGTERM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment