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

Re: Language and locale setting in /root/dbootstrap_setting

#include <hallo.h>
Petter Reinholdtsen wrote on Tue Feb 12, 2002 um 12:46:38AM:

> There seem to be some confusion.  Why was LANGUAGE= changed to LANG=?
> Which program is the intended receiver of this value?

Good question. I though base-config was the only one, but now I have
seen that the file is sourced into the base-config's environment.

> I suggest setting something like this.  I'll have to investigate some
> more to find out where to tell debootstrap to install locale.

There was no way, --include option in the new deboostrap is meant for
such purposes.

> Another thing I noticed was that the code i boot-floopies seem to
> assume non-utf-8 is english, and that all translations is using utf-8.
> Is this correct?  Should the default locale support utf-8 instead of
> my suggested ISO-8859-1?

Why? UTF-8 is still broken in most apps. The only Pro is the option to
use different languages in the installation terminal (bterm).

> BTW: the latest debootstrap fail to build on arm and m68k.  MAKEDEV do
>   not know 'usb'.  Check buildd logs for details.

MAKEDEV is broken, it looks in procfs wheteher the device type is
supported by the running kernel. I will file a bug when my network is

> -  if ( lang != NULL )
> -    write_userconfig("LANG_INST", lang->locale);
> +  if ( lang != NULL ) {
> +    /* Pick any C/POSIX compatible locale.  Make sure this locale is generated
> +       by locale-gen. */
> +    write_userconfig("LANG", "en_US.ISO-8859-1");

Okay, if it does not break anything.

> +    /* Specify which translation to use when displaying messages */
> +    write_userconfig("LANGUAGE", lang->locale);
> +
> +    /* Keep perl quiet if the locale is missing */
> +    write_userconfig("PERL_BADLANG", "0");

IMHO not needed, if LANG is C compatible.

I tried this a while ago to install locales. It is broken since I do not
allocate the string memory correctly, but the basic idea is clear.

Index: extract_base.c
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/extract_base.c,v
retrieving revision 1.71
diff -r1.71 extract_base.c
<   char filename [512];
>   char filename [512], locales="";
> #if 0 
>   if (yesNoBox(_("Would you like to install additional localisation packages?\nThese are needed to support other languages than default (English) later.")),_("Locales installation") == DLG_YES)
>      locales=" --include=locales,debconf";
> #endif
<   INFOMSG("running '%s %s %s %s %s %s %s'",
<           argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
>   INFOMSG("running '%s %s %s %s %s %s %s %s'",
>           argv[0], argv[1], locales, argv[2], argv[3], argv[4], argv[5], argv[6]);

Expect the unexpected and expect the expected to be late.

Reply to: