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

Preseeding improvements for localechooser



I've got a patch series for localechooser queued up that makes preseeding 
localechooser more powerful and flexible. This solves #469680 and #553389.

The series also contains a number of cleanups that make the code more 
readable, especially regarding locale manipulation.
The added functionality does mean increased size of the script of course.

localechooser now supports two modes for preseeding [1]:

1) Current functionality: preseed only locale
Examples:
- locale=nl    => language=nl, country=NL, locale=nl_NL.UTF-8
- locale=nl_BE => language=nl, country=BE, locale=nl_BE.UTF-8
- locale=en_NL => language=en, country=NL, locale=en_US.UTF-8

2) New functionality: preseed language and/or country + optionally locale
Examples:
- language=nl => language=nl, country=NL, locale=nl_NL.UTF-8
  same as preseeding locale=nl
- country=NL => language will be asked; country is preseeded
  not very usefull, but it can be done
- language=en country=NL => language=en, country=NL, locale=en_US.UTF-8
  same as preseeding locale=en_NL
- language=en country=NL locale=en_GB.UTF-8 => all as preseeded
  this is currently not possible
- language=zh_TW country=HK => language=zh_TW country=HK locale=zh_HK@UTF-8
  this is currently not possible: see #469680

And you can even do:
   language=en country=NL locale=en_GB.UTF-8 \
   localechooser/supported-locales=nl_NL.UTF-8,en_US.UTF-8,xx_XX.invalid

With that en_GB.UTF-8 will be default, and nl_NL.UTF-8 and en_US.UTF-8 will 
also be generated. xx_XX.invalid gets filtered out because it's not 
supported.


An image for testing is available at:
http://people.debian.org/~fjp/tmp/d-i/choose-mirror/

This image contains
- these localechooser changes
- the new choose-mirror
- my proposed version for tzsetup
So everything I've been working on can be given a try :-)

Unless I get comments on these localechooser changes I'll commit them after 
the weekend. If someone wants to see the patches before then, please let 
me know.

Cheers,
FJP

[1] Of course this is primarily intended for use with preseed files, but it 
also works very nicely from the boot prompt (including preseeding without 
setting the seen flag using "?=".
The preseed aliases "language" and "country" are new.

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: