Here's a working and POSIX compatible patch for locales.config.

Kind regards
Matthias
diff --git a/debian/debhelper.in/locales.config 
b/debian/debhelper.in/locales.config
index b9620bf7..21f96d3d 100644
--- a/debian/debhelper.in/locales.config
+++ b/debian/debhelper.in/locales.config
@@ -51,7 +51,8 @@ fi
 DEFAULT_ENVIRONMENT="$(cat /etc/default/locale /etc/locale.conf 2>/dev/null | 
awk '/^LANG=/ {gsub("\"", ""); sub("LANG=", ""); lang=$0;} END {print lang}')"
 DEFAULT_ENVIRONMENT="$(convert_locale "$DEFAULT_ENVIRONMENT")"
 if [ -n "$SUPPORTED_LOCALES" ] && [ -n "$DEFAULT_ENVIRONMENT" ]; then
-  if echo "$SUPPORTED_LOCALES" | grep -q -e "\b$DEFAULT_ENVIRONMENT\b" ; then
+  RC=0 ; { printf -- '%s' "${SUPPORTED_LOCALES}" | grep -q -e 
"\b${DEFAULT_ENVIRONMENT}\b" ; } || RC="${?}"
+  if [ "${RC}" -eq 0 ]; then
     db_set locales/default_environment_locale "$DEFAULT_ENVIRONMENT"
   fi
 fi

Reply via email to