r1416 - in glibc-package/trunk/debian: . debhelper.in local
Author: barbier
Date: 2006-04-11 22:59:11 +0000 (Tue, 11 Apr 2006)
New Revision: 1416
Added:
glibc-package/trunk/debian/local/locales.NEWS.Debian
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/debhelper.in/locales.config
glibc-package/trunk/debian/debhelper.in/locales.install
glibc-package/trunk/debian/debhelper.in/locales.postinst
Log:
Do no more transfer variables from /etc/environment to /etc/default/locale
in locales.postinst, but instead add /usr/share/doc/locales/NEWS.Debian
to explain that /etc/environment needs to be cleaned up.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2006-04-11 22:48:28 UTC (rev 1415)
+++ glibc-package/trunk/debian/changelog 2006-04-11 22:59:11 UTC (rev 1416)
@@ -17,8 +17,11 @@
[ Denis Barbier ]
* Remove ldd calls in libc.preinst.
+ * Do no more transfer variables from /etc/environment to /etc/default/locale
+ in locales.postinst, but instead add /usr/share/doc/locales/NEWS.Debian
+ to explain that /etc/environment needs to be cleaned up.
- -- Denis Barbier <barbier@debian.org> Tue, 11 Apr 2006 21:24:13 +0200
+ -- Denis Barbier <barbier@debian.org> Wed, 12 Apr 2006 00:50:32 +0200
glibc (2.3.6-6) unstable; urgency=low
Modified: glibc-package/trunk/debian/debhelper.in/locales.config
===================================================================
--- glibc-package/trunk/debian/debhelper.in/locales.config 2006-04-11 22:48:28 UTC (rev 1415)
+++ glibc-package/trunk/debian/debhelper.in/locales.config 2006-04-11 22:59:11 UTC (rev 1416)
@@ -25,6 +25,11 @@
fi
DEFAULT_ENVIRONMENT=None
EE="/etc/default/locale"
+# Prior to locales 2.3.6-5, variables were stored in /etc/environment
+if [ "$1" = "configure" ] && [ -e "/etc/environment" ] && dpkg --compare-versions "$2" lt 2.3.6-5
+then
+ EE="/etc/environment"
+fi
if [ -e "$EE" ]; then
DEFAULT_ENVIRONMENT=$(awk 'BEGIN {lang="None"} /^LANG=/ {gsub("\"", ""); sub("LANG=", ""); lang=$0;} END {print lang}' $EE)
fi
Modified: glibc-package/trunk/debian/debhelper.in/locales.install
===================================================================
--- glibc-package/trunk/debian/debhelper.in/locales.install 2006-04-11 22:48:28 UTC (rev 1415)
+++ glibc-package/trunk/debian/debhelper.in/locales.install 2006-04-11 22:59:11 UTC (rev 1416)
@@ -6,3 +6,4 @@
debian/local/usr_sbin/update-locale usr/sbin
debian/local/usr_sbin/validlocale usr/sbin
DEB_SRCDIR/localedata/README usr/share/doc/locales
+debian/local/locales.NEWS.Debian usr/share/doc/locales/NEWS.Debian
Modified: glibc-package/trunk/debian/debhelper.in/locales.postinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/locales.postinst 2006-04-11 22:48:28 UTC (rev 1415)
+++ glibc-package/trunk/debian/debhelper.in/locales.postinst 2006-04-11 22:59:11 UTC (rev 1416)
@@ -4,30 +4,6 @@
LG="/etc/locale.gen"
EE="/etc/default/locale"
-# Until locales 2.3.6-5, locale variables were stored into /etc/environment
-if [ "$1" = "configure" ] && [ -e "/etc/environment" ] && dpkg --compare-versions "$2" lt 2.3.6-5
-then
- OLDEE="/etc/environment"
- exist=1
- if [ ! -e "$EE" ]; then
- exist=
- found=
- echo "# File generated by update-locale" > $EE
- fi
- for i in LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
- do
- if [ -z "$exist" ]; then
- if grep "^ *$i=" $OLDEE >> $EE; then
- found=1
- fi
- fi
- sed -i -e "s/^ *$i=/#&/" $OLDEE
- done
- if [ -z "$exist" ] && [ -z "$found" ]; then
- rm -f $EE
- fi
-fi
-
if [ "$1" = configure ]; then
. /usr/share/debconf/confmodule
@@ -89,7 +65,8 @@
# Set default LANG environment variable
if [ -e $EE ]; then
- /usr/sbin/update-locale --remove LANG
+ # Remove previous definitions
+ /usr/sbin/update-locale LANG
fi
if [ -n "$SELECTED" ] && [ "$SELECTED" != "None" ]; then
/usr/sbin/update-locale "LANG=$SELECTED"
Added: glibc-package/trunk/debian/local/locales.NEWS.Debian
===================================================================
--- glibc-package/trunk/debian/local/locales.NEWS.Debian 2006-04-11 22:48:28 UTC (rev 1415)
+++ glibc-package/trunk/debian/local/locales.NEWS.Debian 2006-04-11 22:59:11 UTC (rev 1416)
@@ -0,0 +1,11 @@
+locales (2.3.6-7) unstable; urgency=low
+
+ * Locale variables are now stored in /etc/default/locale and no more
+ /etc/environment. The reason is that Debian Policy forbids modifying
+ configuration files of other packages, and /etc/environment is a
+ configuration file for PAM.
+ Make sure to remove old definitions from /etc/environment, this file
+ is no more modified for the reason explained above.
+
+ -- Denis Barbier <barbier@debian.org> Tue, 11 Apr 2006 21:24:13 +0200
+
Reply to: