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

Re: /usr/lib/locale/<locale> and locale-archive should remove before generating locales?



At Fri, 4 Apr 2003 21:15:40 +0200,
Denis Barbier wrote:
> 
> On Fri, Mar 28, 2003 at 10:41:04PM +0900, GOTO Masanori wrote:
> [...]
> > Thanks, I've now added in locales.postinst:
> > 
> >      # Update requested locales.  Remove all old locale dir and 
> >      # locale-archive before generating new locale data.
> >      if test -z $LEAVE_FLAG; then
> >         rm -rf /usr/lib/locale/*
> >         /usr/sbin/locale-gen
> >      fi
> >  
> > Removing all files/dirs might be problem.  However at least there is
> > no package to touch /usr/lib/locale on my machine, so I guess it's
> > acceptable.
> 
> I tried to generate all locales with 2.3.2, hit es_EC, edit /etc/locale.gen
> and remove everything up to es_EC as usual, re-run locale-gen. hit
> es_EC.UTF-8, edit /etc/locale.gen and remove everything up to es_EC.UTF-8,
> and re-run locale-gen.
> But locales from the two first runs are deleted :(

Yes, it's intentional.

Currently it does not remain old entries before generating locales
using debconf.  We force not to use the old locale entries.
Debian is designed for upgrading old environment to new environment
without any re-installations, so sometimes user can use old entries
which were generated in the past but currently they're not selected.
It may lead confusion.  This "restriction" may be strong, but it's
intuitive.  Generating locales are described only in /etc/locale.gen.
If you don't use debconf, then it does not cause any removal.

In addition, locale-gen does not remove /usr/lib/locale/* files.
"rm -rf /usr/lib/locale/*" is in locales.postinst.

> In fact /usr/lib/locale/locale-archive should not be removed, so you
> may write instead
>           rm -rf /usr/lib/locale/??_*

Debconf generated ??_*, but user might generate for example "de.UTF-8"
or "C.UTF-8"... Well, it can be ignored, though.

Regards,
-- gotom



Reply to: