Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94048 - init.d/keymaps double loadkeys with unicode
Summary: init.d/keymaps double loadkeys with unicode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-26 02:15 UTC by Eugene Pavlovsky
Modified: 2005-07-14 20:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my keymap config (keymaps,910 bytes, text/plain)
2005-06-08 05:30 UTC, Eugene Pavlovsky
Details
my keymap (qwerty-ru-utf-8.map,9.37 KB, text/plain)
2005-06-08 05:31 UTC, Eugene Pavlovsky
Details
fixed /etc/init.d/keymaps (keymaps,2.16 KB, text/plain)
2005-07-11 07:19 UTC, Eugene Pavlovsky
Details
keymaps.unicode (keymaps.unicode,728 bytes, patch)
2005-07-13 18:29 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Pavlovsky 2005-05-26 02:15:13 UTC
if I use UNICODE=yes, the loadkeys command is performed twice - once outside the
unicode check (before it), one inside it. Additionaly, as I use my custom keymap
which uses UTF-8 symbols, the first (before unicode check) loadkeys command
gives a warning that I should run "kbd_mode -u", which is done later (inside the
unicode check). I think the initial loadkeys (before unicode check) should be
moved to UNICODE=NO (else) branch of this check.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-05-27 15:55:57 UTC
sounds like you have '-u' in KEYMAPS

remove it
Comment 2 Eugene Pavlovsky 2005-06-03 07:42:18 UTC
i've removed it, but i get these warning during boot time:
 * Loading key mappings ...
 loadkeys: warning: this map uses Unicode symbols
     (perhaps you want to do `kbd_mode -u'?)
Comment 3 SpanKY gentoo-dev 2005-06-03 08:16:39 UTC
well i cant keep guessing at your settings so post /etc/conf.d/keymaps
Comment 4 Eugene Pavlovsky 2005-06-08 05:30:39 UTC
Created attachment 60833 [details]
my keymap config

damn, i thought i posted it last time. here it is.
will post my keymap next
Comment 5 Eugene Pavlovsky 2005-06-08 05:31:57 UTC
Created attachment 60834 [details]
my keymap
Comment 6 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2005-06-25 14:17:27 UTC
Same problem here.
Comment 7 Eugene Pavlovsky 2005-07-11 07:19:54 UTC
Created attachment 63144 [details]
fixed /etc/init.d/keymaps

here's a fixed /etc/init.d/keymaps. i believe this is a good (not ugly)
solution for this bug, and it works for me.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-11 07:37:36 UTC
That basically duplicates code we have already ... did you set UNICODE="yes" in
/etc/rc.conf?
Comment 9 Eugene Pavlovsky 2005-07-12 01:48:48 UTC
yes, i did.
look, your code calls loadkeys twice. it is first run before $UNICODE is even
checked, and immediately bitches about UNICODE characters in my keymap (i've got
my own custom keymap with unicode characters) - it warns me about these unicode
characters and that i should set kbd_mode to unicode. if kbd_mode -u is run
before this first loadkeys invocation, there're no problems. maybe you should
move the check for $UNICODE before this first invocation and remove my code - i
don't care; the important thing is: for loadkeys to not print a warning, the
kbd_mode -u should be called before it.
Comment 10 Eugene Pavlovsky 2005-07-12 01:49:54 UTC
my code checks specifically for unicode characters in the keymap, not for
$UNICODE, and sets kbd_mode depending on their presence.
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-13 02:31:54 UTC
Understood, I think the moving might be an option.  I am not sure about the
autodetection though ... that might start to get high maintainence ?  (Sorry,
not utf8 fundy)
Comment 12 Eugene Pavlovsky 2005-07-13 04:16:06 UTC
I'm not sure I understand your question, Martin.
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-13 05:42:49 UTC
Meaning, will it work for all utf8 keymaps in all setups?
Comment 14 Eugene Pavlovsky 2005-07-13 07:10:30 UTC
i think it should, my check is very generic.
i think zgrep should be used instead of grep because keymaps may be compressed,
zgrep can search in both compressed and uncompressed files.
Comment 15 SpanKY gentoo-dev 2005-07-13 18:29:07 UTC
Created attachment 63349 [details, diff]
keymaps.unicode

well if all you need to fix this bug is run kbd_mode -u early on, then this
patch should fix you right ?
Comment 16 Eugene Pavlovsky 2005-07-13 23:57:52 UTC
yes, this patch would work too. can be commited to portage, i think
Comment 17 SpanKY gentoo-dev 2005-07-14 20:49:11 UTC
added to svn then, thanks