Commit 6e4178cf authored by Thomas Goirand's avatar Thomas Goirand

merge patched into master

parents bdfecb9c c3817d0a
# see git-dpm(1) from git-dpm package
a52522301eeb92a5dc7aadf4f9a36f939413b4e8
a52522301eeb92a5dc7aadf4f9a36f939413b4e8
c3817d0a8a9f60b187a626c08d351ce07b213a79
c3817d0a8a9f60b187a626c08d351ce07b213a79
7fb6f78177b5ece10ca7c54ba3958010a9987f06
7fb6f78177b5ece10ca7c54ba3958010a9987f06
cloud-init_0.7.9.orig.tar.xz
......
From c3817d0a8a9f60b187a626c08d351ce07b213a79 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <zigo@debian.org>
Date: Mon, 16 Oct 2017 22:11:38 +0000
Subject: Fix message when a local is missing.
---
tools/Z99-cloud-locale-test.sh | 37 ++++---------------------------------
1 file changed, 4 insertions(+), 33 deletions(-)
diff --git a/tools/Z99-cloud-locale-test.sh b/tools/Z99-cloud-locale-test.sh
index 5912bae2..5ad3b9a6 100755
--- a/tools/Z99-cloud-locale-test.sh
+++ b/tools/Z99-cloud-locale-test.sh
@@ -52,39 +52,10 @@ locale_warn() {
printf " The unknown environment variables are:\n %s\n" "$bad_kv"
printf " This can affect your user experience significantly, including the\n"
printf " ability to manage packages. You may install the locales by running:\n\n"
-
- local bad invalid="" to_gen="" sfile="/usr/share/i18n/SUPPORTED"
- local pkgs=""
- if [ -e "$sfile" ]; then
- for bad in ${bad_lcs}; do
- grep -q -i "${bad}" "$sfile" &&
- to_gen="${to_gen} ${bad}" ||
- invalid="${invalid} ${bad}"
- done
- else
- printf " sudo apt-get install locales\n"
- to_gen=$bad_lcs
- fi
- to_gen=${to_gen# }
-
- local pkgs=""
- for bad in ${to_gen}; do
- pkgs="${pkgs} language-pack-${bad%%_*}"
- done
- pkgs=${pkgs# }
-
- if [ -n "${pkgs}" ]; then
- printf " sudo apt-get install ${pkgs# }\n"
- printf " or\n"
- printf " sudo locale-gen ${to_gen# }\n"
- printf "\n"
- fi
- for bad in ${invalid}; do
- printf "WARNING: '${bad}' is an invalid locale\n"
- done
-
- printf "To see all available language packs, run:\n"
- printf " apt-cache search \"^language-pack-[a-z][a-z]$\"\n"
+ printf " sudo dpkg-reconfigure locales\n\n"
+ printf " and select the missing language. Alternatively, you can install the\n"
+ printf " locales-all package:\n\n"
+ printf " sudo apt-get install locales-all\n\n"
printf "To disable this message for all users, run:\n"
printf " sudo touch /var/lib/cloud/instance/locale-check.skip\n"
printf "_____________________________________________________________________\n\n"
......@@ -9,3 +9,4 @@
0009-Drop-all-unused-extended-version-handling.patch
0010-PATCH-Fix-Python-code-style-errors-Closes-865577.patch
0011-Trust-PATH-for-udevadm-and-modprobe.patch
0012-Fix-message-when-a-local-is-missing.patch
......@@ -52,39 +52,10 @@ locale_warn() {
printf " The unknown environment variables are:\n %s\n" "$bad_kv"
printf " This can affect your user experience significantly, including the\n"
printf " ability to manage packages. You may install the locales by running:\n\n"
local bad invalid="" to_gen="" sfile="/usr/share/i18n/SUPPORTED"
local pkgs=""
if [ -e "$sfile" ]; then
for bad in ${bad_lcs}; do
grep -q -i "${bad}" "$sfile" &&
to_gen="${to_gen} ${bad}" ||
invalid="${invalid} ${bad}"
done
else
printf " sudo apt-get install locales\n"
to_gen=$bad_lcs
fi
to_gen=${to_gen# }
local pkgs=""
for bad in ${to_gen}; do
pkgs="${pkgs} language-pack-${bad%%_*}"
done
pkgs=${pkgs# }
if [ -n "${pkgs}" ]; then
printf " sudo apt-get install ${pkgs# }\n"
printf " or\n"
printf " sudo locale-gen ${to_gen# }\n"
printf "\n"
fi
for bad in ${invalid}; do
printf "WARNING: '${bad}' is an invalid locale\n"
done
printf "To see all available language packs, run:\n"
printf " apt-cache search \"^language-pack-[a-z][a-z]$\"\n"
printf " sudo dpkg-reconfigure locales\n\n"
printf " and select the missing language. Alternatively, you can install the\n"
printf " locales-all package:\n\n"
printf " sudo apt-get install locales-all\n\n"
printf "To disable this message for all users, run:\n"
printf " sudo touch /var/lib/cloud/instance/locale-check.skip\n"
printf "_____________________________________________________________________\n\n"
......
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