Re: localising base-config - end game
[Eduard Bloch]
> Look okay. Few questions:
>
> - we use weird locales strings on BFs, in the form of
> xx_YY.charset@euro. You extract this with re on
> my ($locale) = $LANG =~ m/^([^.@]+)/;
> and write this into /etc/locale.gen. I am not sure, but IMHO this
> extracts only the xx_YY part without @euro. But for the LANG value,
> you need the @euro part.
Well the weird locales should be valid locales. It should be passed
into LANG without translations.
% LANG=de_DE.ISO-8859-15@euro date
Don Mär 7 14:19:49 CET 2002
%
In /etc/locale.gen, the string added should read
de_DE@euro ISO-8859-15
My validlocale parses the LANG content the same way locale-gen does it
and output the string to put in /etc/locale.gen if the locale is
currently invalid.
>> the process. I also discovered a blocker with debootstrap. It will
>> only load the base-config package from 'main' or 'non-US/main', while
>> my packages naturally ends up in 'local'. This is bug #116801
>> "debootstrap: does not allow local branch only consults main branch of
>
> How could you succeed with this patch?
> a) the local directory is not listed in Release, and only it's contents
> are parsed
> b) debootstrap does checking of the binaries, you cannot replace one
> just so
Well, it worked. :-)
I made a installation CD using debian-cd, with base-config in the
local section. It failed out of the box, unable to find base-config.
I booted it again, using Alt-F2 to edit debootstrap before it was
invoked, and this time it worked. I thus assumes that the patch given
in #116801 works as it should. If this is wrong, please explain when
it will fail.
> That is you opionion. Some people do not want systemwide locales but
> a localised installation.
Well, that is what I want as well. :-)
> As said, please first check the expressions, and compare with mine. This
> all was needed to extract charset and lang string (inc. @euro) and
> fixing the charset (ISO88... -> ISO-88...).
Will do.
> If it is invalid, do not use it.
Sure, but base-config loads the locale info from
/root/dbootstrap_settings, no matter what termwrap discovered about
these variables. It must ignore LANG and LANGUAGE settings if the
locale is missing or the charset is incompatible with the current
terminal. Of course, using LANG_INST and LANGUAGE_INST should be a
good alternative. Then termwrap could check and only pass the two
variables as LANG and LANGUAGE if the locale is valid and the charset
is supported.
> If you run locale-gen early enough, you should not see any warnings.
Only if the locale string is usable. The previous German locale
string was 'de'. That is no valid locale, and cases like that should
be detected to avoid all the perl warnings mentioned earlier.
Could someone add this patch:
Index: util.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/util.c,v
retrieving revision 1.78
diff -u -3 -p -u -r1.78 util.c
--- util.c 2002/03/06 08:29:59 1.78
+++ util.c 2002/03/07 13:31:35
@@ -700,7 +700,14 @@ check_pending_config(void)
#ifdef USE_LANGUAGE_CHOOSER
if ( lang != NULL )
+ {
+ /* The locale should be generated by base-config if needed, and ignored
+ if it can't be used. */
write_userconfig("LANG_INST", lang->locale);
+
+ /* Specify priority list of translations to use when displaying messages */
+ write_userconfig("LANGUAGE_INST", lang->msgcat);
+ }
#endif
#if #cpu(powerpc)
Reply to: