Re: /usr/lib/locale/<locale> and locale-archive should remove before generating locales?
On Sun, Apr 06, 2003 at 09:20:45PM +0200, Denis Barbier wrote:
[...]
> But I selected "Leave alone" and my /etc/locale.gen never contained the
> "XXX GENERATED XXX" string, and files were removed.
> The problem semms to be that locales/locales_to_be_generated does no
> more contain "Leave alone" after locales.config is run.
> Maybe some tests from locales.postinst should be cut'n'pasted into
> locales.config?
With this patch, /usr/lib/locale/* files are no more deleted when
/etc/locale.gen is not managed by debconf.
Denis
Index: config
===================================================================
RCS file: /cvs/glibc/glibc-package/debian/locales/DEBIAN/config,v
retrieving revision 1.4
diff -u -r1.4 config
--- config 18 Feb 2003 07:00:56 -0000 1.4
+++ config 6 Apr 2003 20:05:46 -0000
@@ -9,7 +9,7 @@
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}"
+ grep -q "XXX GENERATED XXX" /etc/locale.gen && db_set locales/locales_to_be_generated "${SELECTED_LOCALES}"
else
LG=/dev/null
fi
Index: postinst
===================================================================
RCS file: /cvs/glibc/glibc-package/debian/locales/DEBIAN/postinst,v
retrieving revision 1.5
diff -u -r1.5 postinst
--- postinst 28 Mar 2003 13:40:43 -0000 1.5
+++ postinst 6 Apr 2003 20:05:46 -0000
@@ -8,9 +8,10 @@
. /usr/share/debconf/confmodule
db_version 2.0
+ LEAVE_FLAG="yes"
if test ! -e $LG || grep -q "XXX GENERATED XXX" $LG || dpkg --compare-versions "$2" le 2.2.4-7; then
db_get locales/locales_to_be_generated && SELECTED_LOCALES=$RET
- echo $SELECTED_LOCALES | grep -q "Leave alone" && LEAVE_FLAG="yes"
+ echo $SELECTED_LOCALES | grep -q "Leave alone" || LEAVE_FLAG=
if test -z $LEAVE_FLAG; then
cat > $LG << EOF
# This file lists locales that you wish to have built. You can find a list
Reply to: