[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#527945: locales: bashism in locales.config



Package: locales
Version: 2.9-12
Severity: serious
Justification: Policy 10.4
User: debian-release@lists.debian.org
Usertags: goal-dash
Tags: patch

/var/lib/dpkg/info/locales.config uses "echo -e", which is a bashism.

--
Jakub Wilk
diff --git a/locales.config b/locales.config
--- a/locales.config
+++ b/locales.config
@@ -459,7 +459,7 @@
 fi
 
 # List of supported locales (PROVIDED_LOCALES + USER_LOCALES + GEN_LOCALES)
-SUPPORTED_LOCALES="$(echo -e "$PROVIDED_LOCALES\n$USER_LOCALES\n$GEN_LOCALES" | grep -v "^$" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
+SUPPORTED_LOCALES="$(printf '%s\n' "$PROVIDED_LOCALES" "$USER_LOCALES" "$GEN_LOCALES" | grep -v "^$" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
 db_subst locales/locales_to_be_generated locales "$SUPPORTED_LOCALES"
 
 # Get the list of selected locales from /etc/locale.gen

Reply to: