Re: Best way to generate locales on CDD
On Sat, 2007-10-20 at 00:51 -0700, firstname.lastname@example.org wrote:
> On Wed, Oct 17, 2007 at 07:30:42AM -0400, Ernesto Hernandez-Novich wrote:
> > The CDD I'm working on must support several locales after installation.
> > Package locales is being included in the package list. I've preseeded it
> > using
> > locales locales/default_environment_locale select
> > es_ES.UTF-8
> > locales locales/locales_to_be_generated multiselect \
> > en_US.UTF-8 UTF-8, es_ES.UTF-8 UTF-8, es_VE.UTF-8 UTF-8
> possibly debian-installer is overwriting the locale information? i don't
> if you're using simple-cdd, you could add a profiles/NAME.postinst to
> handle whatever modifications you need. it gets copied into the
> installed environment late in the process, so you could modify
> /etc/locale.gen and then run locale-gen, something like:
I did that, and it works. While doing that it revealed a stranger
My CDD has to work in spanish, so I preseeded the _installer_ to work in
spanish. There are at least two types of spanish keyboards (spanish
proper and latinamerican) therefore I left the keyboard question open so
the user can choose properly. I then used preseeding of xserver-xorg so
that the keyboard gets detected automatically based on whatever layout
the user chose during the installation. However, this preseed did not
work at all; once installed the console keyboard (chosen by user during
install) would be perfect, but xorg's keyboard (supposedly preseeded and
taken automatically) was _always_ us-american.
I checked the installation logs and found out that xorg was not seeing
the chosen keyboard. After a bit of debugging, xserver-xorg postinst
uses debconf to find out what keyboard was chosen during install, but
according to the installation logs this information was not available at
that point of the installation. Looks like the profile packages are
being installed too early (or something like that).
I ended up writing CNTI.postinst only to force the preseed (again) of
xserver-xorg in order to have it autodetect the keyboard, and
immediately doing dpkg-reconfigure. That way it works, but still is a
Same thing happens with the locales; the only locale being generated is
that of the installer: I changed it to es_VE and es_ES and each time it
only generated the one I had chosen, regardless of the preseed. Once I
changed CNTI.postinst, it all worked out all right.
Maybe the profiles should be applied later in the installation process
so that all the preseeding information is available...
Ernesto Hernández-Novich - Linux 2.6.18 i686 - Unix: Live free or die!
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3