Mageia Bugzilla – Attachment 3802 Details for
Bug 9808
cannot open file alt_shift_toggle
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Patch to fix the issue in dracut
0001-Match-.map-files-before-.inc-files-when-looking-for-.patch (text/plain), 2.44 KB, created by
Colin Guthrie
on 2013-04-24 11:30:48 CEST
(
hide
)
Description:
Patch to fix the issue in dracut
Filename:
MIME Type:
Creator:
Colin Guthrie
Created:
2013-04-24 11:30:48 CEST
Size:
2.44 KB
patch
obsolete
>From 32e11a40d70275cd6ce8ab16a02146f846e3b9d7 Mon Sep 17 00:00:00 2001 >From: Colin Guthrie <colin@mageia.org> >Date: Wed, 24 Apr 2013 10:16:50 +0100 >Subject: [PATCH] Match .map* files before .inc files when looking for keymaps. > >If an extra keymap is defined (UNIKEYMAP and GRP_TOGGLE) then >on some occasions, dracut will pick the .inc file rather than >the .map file which causes an error in the initrd: > https://bugs.mageia.org/show_bug.cgi?id=9808 > >As we should favour the name sans any extension, we run that >one first, then run one that matches the *.map* pattern and finally >one that matches all files as before. > >An alternative fix here would be to simply miss off the final find call >as tests run on my system suggest that this would be sufficient to find >all the necessary maps: > >$ find /usr/lib/kbd/keymaps -type f | grep -vE "\.(inc|map.gz)$" >/usr/lib/kbd/keymaps/i386/qwerty/hypermap.m4 >/usr/lib/kbd/keymaps/i386/qwerty/no-latin1.doc >/usr/lib/kbd/keymaps/include/compose.latin1 >/usr/lib/kbd/keymaps/include/compose.latin2 >/usr/lib/kbd/keymaps/include/compose.latin3 >/usr/lib/kbd/keymaps/include/compose.8859_7 >/usr/lib/kbd/keymaps/include/vim-compose.latin1 >/usr/lib/kbd/keymaps/include/compose.latin >/usr/lib/kbd/keymaps/include/compose.latin4 >/usr/lib/kbd/keymaps/include/compose.8859_8 > >In this case we want to exclude the .m4 and .doc files and when >searching for a map, we also want to ignore the .inc files. Those files >without an extension should be matched directly already by the first >find and thus everything is covered. .inc files would be included >by the include parsing of the parent map (in this case it's slightly >inefficient as both .inc and .map files may be included when a .inc >file may be sufficient. >--- > modules.d/10i18n/module-setup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh >index 21b0c05..06587de 100755 >--- a/modules.d/10i18n/module-setup.sh >+++ b/modules.d/10i18n/module-setup.sh >@@ -22,7 +22,7 @@ install() { > findkeymap () { > local MAP=$1 > [[ ! -f $MAP ]] && \ >- MAP=$(find ${kbddir}/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1) >+ MAP=$((find ${kbddir}/keymaps -type f -name $MAP; find ${kbddir}/keymaps -type f -name $MAP.map\*; find ${kbddir}/keymaps -type f -name $MAP.\*) | head -n1) > [[ " $KEYMAPS " = *" $MAP "* ]] && return > KEYMAPS="$KEYMAPS $MAP" > case $MAP in >-- >1.8.1.5 >
From 32e11a40d70275cd6ce8ab16a02146f846e3b9d7 Mon Sep 17 00:00:00 2001 From: Colin Guthrie <colin@mageia.org> Date: Wed, 24 Apr 2013 10:16:50 +0100 Subject: [PATCH] Match .map* files before .inc files when looking for keymaps. If an extra keymap is defined (UNIKEYMAP and GRP_TOGGLE) then on some occasions, dracut will pick the .inc file rather than the .map file which causes an error in the initrd: https://bugs.mageia.org/show_bug.cgi?id=9808 As we should favour the name sans any extension, we run that one first, then run one that matches the *.map* pattern and finally one that matches all files as before. An alternative fix here would be to simply miss off the final find call as tests run on my system suggest that this would be sufficient to find all the necessary maps: $ find /usr/lib/kbd/keymaps -type f | grep -vE "\.(inc|map.gz)$" /usr/lib/kbd/keymaps/i386/qwerty/hypermap.m4 /usr/lib/kbd/keymaps/i386/qwerty/no-latin1.doc /usr/lib/kbd/keymaps/include/compose.latin1 /usr/lib/kbd/keymaps/include/compose.latin2 /usr/lib/kbd/keymaps/include/compose.latin3 /usr/lib/kbd/keymaps/include/compose.8859_7 /usr/lib/kbd/keymaps/include/vim-compose.latin1 /usr/lib/kbd/keymaps/include/compose.latin /usr/lib/kbd/keymaps/include/compose.latin4 /usr/lib/kbd/keymaps/include/compose.8859_8 In this case we want to exclude the .m4 and .doc files and when searching for a map, we also want to ignore the .inc files. Those files without an extension should be matched directly already by the first find and thus everything is covered. .inc files would be included by the include parsing of the parent map (in this case it's slightly inefficient as both .inc and .map files may be included when a .inc file may be sufficient. --- modules.d/10i18n/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index 21b0c05..06587de 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -22,7 +22,7 @@ install() { findkeymap () { local MAP=$1 [[ ! -f $MAP ]] && \ - MAP=$(find ${kbddir}/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1) + MAP=$((find ${kbddir}/keymaps -type f -name $MAP; find ${kbddir}/keymaps -type f -name $MAP.map\*; find ${kbddir}/keymaps -type f -name $MAP.\*) | head -n1) [[ " $KEYMAPS " = *" $MAP "* ]] && return KEYMAPS="$KEYMAPS $MAP" case $MAP in -- 1.8.1.5
View Attachment As Raw
Actions:
View
Attachments on
bug 9808
:
3791
|
3800
| 3802