summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/kbd
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-04-16 17:17:28 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-26 09:05:09 (GMT)
commita253b0e85e7c1df16c9a6b7f27ed6173e33e4e90 (patch)
treeceb5f4d62eefaab1946e7a34126c456a2fe8ac83 /meta/recipes-core/kbd
parent469a4b9d8ad5d6c6a7572bdbbdbbaea4a11c71e4 (diff)
downloadpoky-a253b0e85e7c1df16c9a6b7f27ed6173e33e4e90.tar.gz
kbd: Use update-alternatives
Change to use ALTERNATIVE_LINKS from update-alternatives. This ensures the links are created consistently and the package provides are correct. (From OE-Core rev: 728569a3db005a935e6b08d6aac3e23e88d486df) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/kbd')
-rw-r--r--meta/recipes-core/kbd/kbd_1.15.2.bb34
1 files changed, 7 insertions, 27 deletions
diff --git a/meta/recipes-core/kbd/kbd_1.15.2.bb b/meta/recipes-core/kbd/kbd_1.15.2.bb
index eea04a0..99a6a50 100644
--- a/meta/recipes-core/kbd/kbd_1.15.2.bb
+++ b/meta/recipes-core/kbd/kbd_1.15.2.bb
@@ -10,7 +10,7 @@ RREPLACES_${PN} = "console-tools"
10RPROVIDES_${PN} = "console-tools" 10RPROVIDES_${PN} = "console-tools"
11RCONFLICTS_${PN} = "console-tools" 11RCONFLICTS_${PN} = "console-tools"
12 12
13PR = "r2" 13PR = "r3"
14 14
15SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2" 15SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2"
16SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5" 16SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
@@ -23,29 +23,9 @@ FILES_${PN}-consoletrans = "${datadir}/consoletrans"
23FILES_${PN}-keymaps = "${datadir}/keymaps" 23FILES_${PN}-keymaps = "${datadir}/keymaps"
24FILES_${PN}-unimaps = "${datadir}/unimaps" 24FILES_${PN}-unimaps = "${datadir}/unimaps"
25 25
26ALTERNATIVE_NAMES_USRBIN = "chvt deallocvt fgconsole openvt" 26inherit update-alternatives
27 27
28do_install_append() { 28ALTERNATIVE_PRIORITY = "100"
29 usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}" 29
30 for p in $usrbinprogs_a; do 30bindir_progs = "chvt deallocvt fgconsole openvt"
31 if [ -f "${D}${bindir}/$p" ]; then 31ALTERNATIVE_LINKS = "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}"
32 mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
33 fi
34 done
35}
36
37pkg_postinst_${PN} () {
38 usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}"
39 for p in $usrbinprogs_a; do
40 if [ -f "$D${bindir}/$p" ]; then
41 update-alternatives --install ${bindir}/$p $p $p.${PN} 100
42 fi
43 done
44}
45
46pkg_postrm_${PN} () {
47 usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}"
48 for p in $usrbinprogs_a; do
49 update-alternatives --remove $p $p.${PN}
50 done
51}