Bug#172439: patch to fix this bug
Hi,
The attached patch should fix this long outstanding bug.
The previous config script always set locales_to_be_generated
even when /etc/locale.gen doesn't exist. So the question in
dpkg-preconfigure time became empty in dpkg --configure locales time.
The story was as follows:
*** apt-get install locales ****
1) dpkg-preconfigure
----- .config -----
-> db_set locales/locales_to_be_generated ""
-> db_input
question will be asked.
2) dpkg --configure locales
----- .config -----
-> db_set locales/locales_to_be_generated ""
#######HERE THIS QUESTION BECOMES EMPTY#####
-> db_input
question will be skiped.
#######SO THE QUESTION IS STILL EPMTY#####
----- .postinst -----
-> creating /etc/locale.gen which will be empty.
*** dpkg-reconfigure locales ***
----- .config -----
-> db_set locales/locales_to_be_generated ""
-> db_input
question will be asked.
----- .postinst -----
-> creating /etc/locale.gen correctly.
Thanks
diff -urN glibc-2.3.1/debian/changelog glibc-2.3.1.locales/debian/changelog
--- glibc-2.3.1/debian/changelog 2002-12-20 12:16:53.000000000 +0900
+++ glibc-2.3.1.locales/debian/changelog 2002-12-20 11:49:08.000000000 +0900
@@ -1,3 +1,11 @@
+glibc (2.3.1-5.1) unstable; urgency=low
+
+ * Masato Taruishi <taru@debian.org>
+ - debian/locales/DEBIAN/config: db_set only when locale.gen exists
+ (closes: #156386, #151784, #154244, #164523, #172439)
+
+ -- Masato Taruishi <taru@debian.org> Fri, 20 Dec 2002 11:39:10 +0900
+
glibc (2.3.1-5) unstable; urgency=low
* This is the "Leonids" release.
diff -urN glibc-2.3.1/debian/locales/DEBIAN/config glibc-2.3.1.locales/debian/locales/DEBIAN/config
--- glibc-2.3.1/debian/locales/DEBIAN/config 2002-12-20 12:16:53.000000000 +0900
+++ glibc-2.3.1.locales/debian/locales/DEBIAN/config 2002-12-20 11:39:00.000000000 +0900
@@ -3,19 +3,19 @@
SUPPORTED_LOCALES="__SUPPORTED_LOCALES__"
+. /usr/share/debconf/confmodule
+db_version 2.0
+
if test -f /etc/locale.gen; then
LG=/etc/locale.gen
SELECTED_LOCALES=$(egrep -v "^#|^$" $LG | tr "\n" "," | sed -e "s/,/, /g" -e "s/, *$//")
+ db_set locales/locales_to_be_generated "${SELECTED_LOCALES}"
else
LG=/dev/null
fi
SUPPORTED_LOCALES=$( (cat $LG && echo "$SUPPORTED_LOCALES") | egrep -hv "^#|^$" | sort -u | tr "\n" "," | sed -e "s/,/, /g" -e "s/, *$//")
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-db_set locales/locales_to_be_generated "${SELECTED_LOCALES}"
db_subst locales/locales_to_be_generated locales "${SUPPORTED_LOCALES}"
db_capb multiselect
db_input medium locales/locales_to_be_generated || true
Reply to: