I found those two problems when using locale-gen: 1. It looks like it does not accept tabs as delimiter (only spaces). 2. When using without LC_ALL= LANG= I am getting this bug: # locale-gen * Unable to parse the output of your localedef utility. * File a bug about this issue and include the output of 'localedef --help'. Probably it should eliminate LOCALES itself if it parses output that depends on locale... # emerge --info >>> cfg-update-1.8.0-r3 : No new packages have been emerged, checksum index OK... Portage 2.1_pre10-r2 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.4-r2, 2.6.17-rc1-git7-ck1 i686) ================================================================= System uname: 2.6.17-rc1-git7-ck1 i686 AMD Sempron(tm) Gentoo Base System version 1.12.0_pre19 dev-lang/python: 2.4.3 dev-util/ccache: [Not Present] dev-util/confcache: 0.4.2 sys-apps/sandbox: 1.2.18 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fforce-addr -fomit-frame-pointer -momit-leaf-frame-pointer -funit-at-a-time -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fforce-addr -fomit-frame-pointer -momit-leaf-frame-pointer -funit-at-a-time -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig conf-cache distlocks metadata-transfer nostrip parallel-fetch prelink sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="pl" LC_ALL="pl_PL.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common" LINGUAS="pl" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_pl userland_GNU video_cards_nvidia video_cards_fbdev" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK
Created attachment 86132 [details, diff] fix for localedef parsing Hi, this patch fixes locale-gen to work with LANG!=C, it runs localedef with LC_ALL=C.
I ran into this on my french UTF8 boxes (x86 and amd64), I bypassed the problem by running the program with: LC_ALL=C locale-gen
Founded the following bugs: 1) If locale POSIX is the first entry in /etc/locale.gen, locale-gen fails: thunder etc # locale-gen * You should upgrade your /etc/locales.build to /etc/locale.gen * and then remove /etc/locales.build when you're done. * Generating 13 locales (this might take a while) * (1/13) Generating POSIX ... LC_MONETARY: value of field `int_curr_symbol' has wrong length No definition for LC_PAPER category found No definition for LC_NAME category found No definition for LC_ADDRESS category found No definition for LC_TELEPHONE category found No definition for LC_MEASUREMENT category found No definition for LC_IDENTIFICATION category found [ !! ] * (2/13) Generating en_US.ISO-8859-1 ... cannot open locale definition file `ISO-8859-1': No such file or directory [ !! ] * (3/13) Generating en_US.UTF-8 ... cannot open locale definition file `UTF-8': No such file or directory [ !! ] ... * (13/13) Generating ru_RU.CP1251 ... cannot open locale definition file `CP1251': No such file or directory [ !! ] * Bad entry in locale.gen: 'IBM866 '; skipping * Generation complete 1) If it is the last entry, then: thunder etc # locale-gen * You should upgrade your /etc/locales.build to /etc/locale.gen * and then remove /etc/locales.build when you're done. * Generating 13 locales (this might take a while) * (1/13) Generating en_US.ISO-8859-1 ... [ ok ] ... * (13/13) Generating ru_RU.IBM866 ... [ ok ] * Bad entry in locale.gen: 'POSIX '; skipping * Generation complete
thanks, added to cvs ... will be pushed out later tonight with some other stuff