Bug#517884: locales: locales.config ignores debconf entries
Package: locales
Version: 2.9-4
Severity: normal
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If /etc/locale.gen does not yet exist, locales.config ignores existing
debconf entries in locales/locales_to_be_generated and overwrites them. This
was already reported [1] and later fixed in glibc-2.7 but reappears in
glibc-2.9. Patch is attached.
Greetings,
Michael
[1] http://lists.debian.org/debian-glibc/2008/10/msg00155.html
- -- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-7.slh.1-sidux-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages locales depends on:
ii debconf [debconf-2.0] 1.5.25 Debian configuration management sy
ii libc6 [glibc-2.9-1] 2.9-3 GNU C Library: Shared libraries
locales recommends no packages.
locales suggests no packages.
- -- debconf information excluded
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkmsIicACgkQnwTD+9oPQShafACeOQFjS94nYP4SnlV/R1xUxOkn
E2IAn1+l5pzG1ToZx9iIXBpfZMDoTJa1
=b+hF
-----END PGP SIGNATURE-----
--- a/debian/debhelper.in/locales.config
+++ b/debian/debhelper.in/locales.config
@@ -38,10 +38,13 @@
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')"
# Get the list of selected locales from /etc/locale.gen
-if [ -L $LG ] && [ "$(readlink $LG)" = "/usr/share/i18n/SUPPORTED" ]; then
- SELECTED_LOCALES="All locales"
-else
- SELECTED_LOCALES="$(echo "$GEN_LOCALES" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
+if [ -e $LG ]; then
+ if [ -L $LG ] && [ "$(readlink $LG)" = "/usr/share/i18n/SUPPORTED" ]; then
+ SELECTED_LOCALES="All locales"
+ else
+ SELECTED_LOCALES="$(echo "$GEN_LOCALES" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
+ fi
+ db_set locales/locales_to_be_generated "$SELECTED_LOCALES"
fi
DEFAULT_ENVIRONMENT="$(cat /etc/environment /etc/default/locale 2>/dev/null | awk 'BEGIN {lang="None"} /^LANG=/ {gsub("\"", ""); sub("LANG=", ""); lang=$0;} END {print lang}')"
@@ -51,7 +54,6 @@
DEFAULT_ENVIRONMENT="None"
fi
-db_set locales/locales_to_be_generated "$SELECTED_LOCALES"
db_set locales/default_environment_locale "$DEFAULT_ENVIRONMENT"
db_subst locales/locales_to_be_generated locales "$SUPPORTED_LOCALES"
Reply to: