'loadkeys -d' loads defkeymap (e.g. 'defkeymap.map.gz') and if this filename is a symlink
(e.g. '/usr/share/kbd/keymaps/defkeymap.map.gz -> /usr/share/kbd/keymaps/i386/qwerty/pt-latin1.map.gz') it also looks for includes near its target (i.e. as of this example in '/usr/share/kbd/keymaps/i386/include' dir). 'find_standard_incl_file' uses 'readlink' and then calls 'find_incl_file_near_fn'. However, as of 2.1.0 and 2.2.0, in this situation the readlink code is never reached and thus 'loadkeys -d' is unable to load the includes from the location near the symlink target. Example, having the following:
'loadkeys -d' loads the keymap 'i386/qwerty/pt-latin1.map.gz' and then fails finding the first declared include file 'qwerty-layout' that should be found at 'i386/include/' terminating the execution:
Hi,
'loadkeys -d' loads defkeymap (e.g. 'defkeymap.map.gz') and if this filename is a symlink (e.g. '/usr/share/kbd/keymaps/defkeymap.map.gz -> /usr/share/kbd/keymaps/i386/qwerty/pt-latin1.map.gz') it also looks for includes near its target (i.e. as of this example in '/usr/share/kbd/keymaps/i386/include' dir). 'find_standard_incl_file' uses 'readlink' and then calls 'find_incl_file_near_fn'. However, as of 2.1.0 and 2.2.0, in this situation the readlink code is never reached and thus 'loadkeys -d' is unable to load the includes from the location near the symlink target. Example, having the following:
/usr/share/kbd/keymaps/defkeymap.map.gz -> i386/qwerty/pt-latin1.map.gz /usr/share/kbd/keymaps/i386/include/... /usr/share/kbd/keymaps/i386/qwerty/...
'loadkeys -d' loads the keymap 'i386/qwerty/pt-latin1.map.gz' and then fails finding the first declared include file 'qwerty-layout' that should be found at 'i386/include/' terminating the execution:
~# loadkeys -d -v Loading defkeymap.map.gz switching to qwerty-layout syntax error, unexpected ERROR
The following patch restores the expected behavior.
kbd-2.2.0.patch
Thx, jps