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

Bug#250376: prebaseconfig should set APP_CHARSET_MAP



Quoting Recai Oktas (roktas@omu.edu.tr):
> Package: languagechooser
> Version: 1.22
> Severity: important
> Tags: patch l10n d-i
> 
> Hi,
> 
> After I tested the 20040521 daily built Sarge ISO, I noticed that the 
> default Turkish console font 'ter-916f' couldn't be set properly.  I 
> don't know whether this is indeed a bug related with the Terminus font 
> itself (shouldn't it be sufficed to set only the SCREEN_FONT_MAP?), but 
> 'APP_CHARSET_MAP' must also be set in the /etc/console-tools/config file 
> for Turkish console, since when I set the mentioned variable as 'iso09', 
> the problem disappeared after invoking an '/etc/init.d/console-screen.sh 
> restart' command.  So please consider the attached patch as a workaround 
> if this is indeed an issue related with the console-terminus package.
> 
> I am sending the patch 'prebaseconfig.patch' to resolve the problem, 
> though I'm not comfortable with it, because it relies on the content of 
> default config file supplied by the console-tools package.  I think we 
> shouldn't make a deep assumption on the console-tools content.  I 
> suggest to apply the alternative patch 'prebaseconfig-alternative.patch' 
> which IMHO, presents a much simple solution.

I applied the "alternative" patch. I just added a comment before the
variables enforcing.


> --- prebaseconfig	2004-04-13 10:57:45.000000000 +0300
> +++ prebaseconfig.new	2004-05-22 17:59:29.000000000 +0300
> @@ -21,6 +21,7 @@
>          [ "$acm" = utf8 ] && acm=
>          if [ -n "$acm" ]; then
>              sed -e "s/^#SCREEN_FONT_MAP=iso01/SCREEN_FONT_MAP=$acm/" \
> +                -e "s/^#APP_CHARSET_MAP=iso05/APP_CHARSET_MAP=$acm/" \
>                  $ctconfig > $ctconfig.tmp && \
>              mv $ctconfig.tmp $ctconfig
>          fi

I'm not a sed guru, but the purpose here is replacing any
"SCREEN_FONT_MAP=" and "APP_CHARSET_MAP" occurrence, right?

sed -e "s/^#*SCREEN_FONT_MAP=.*/SCREEN_FONT_MAP=$acm/"
sed -e "s/^#*APP_CHARSET_MAP=.*/APP_CHARSET_MAP=$acm/"

should do the trick, no? With it, all line containing the variables
definition, commented or not, will be replaced by the correct line.

Thus we less rely on the config file contents, with one exception : if
the config file does NOT contain the variable definition, it will not
be added.

-- 





Reply to: