diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-04-16 12:17:28 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-26 10:05:09 +0100 |
commit | a253b0e85e7c1df16c9a6b7f27ed6173e33e4e90 (patch) | |
tree | ceb5f4d62eefaab1946e7a34126c456a2fe8ac83 /meta/recipes-core/kbd | |
parent | 469a4b9d8ad5d6c6a7572bdbbdbbaea4a11c71e4 (diff) | |
download | poky-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.bb | 34 |
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 eea04a0754..99a6a50981 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" | |||
10 | RPROVIDES_${PN} = "console-tools" | 10 | RPROVIDES_${PN} = "console-tools" |
11 | RCONFLICTS_${PN} = "console-tools" | 11 | RCONFLICTS_${PN} = "console-tools" |
12 | 12 | ||
13 | PR = "r2" | 13 | PR = "r3" |
14 | 14 | ||
15 | SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2" | 15 | SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2" |
16 | SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5" | 16 | SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5" |
@@ -23,29 +23,9 @@ FILES_${PN}-consoletrans = "${datadir}/consoletrans" | |||
23 | FILES_${PN}-keymaps = "${datadir}/keymaps" | 23 | FILES_${PN}-keymaps = "${datadir}/keymaps" |
24 | FILES_${PN}-unimaps = "${datadir}/unimaps" | 24 | FILES_${PN}-unimaps = "${datadir}/unimaps" |
25 | 25 | ||
26 | ALTERNATIVE_NAMES_USRBIN = "chvt deallocvt fgconsole openvt" | 26 | inherit update-alternatives |
27 | 27 | ||
28 | do_install_append() { | 28 | ALTERNATIVE_PRIORITY = "100" |
29 | usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}" | 29 | |
30 | for p in $usrbinprogs_a; do | 30 | bindir_progs = "chvt deallocvt fgconsole openvt" |
31 | if [ -f "${D}${bindir}/$p" ]; then | 31 | ALTERNATIVE_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 | |||
37 | pkg_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 | |||
46 | pkg_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 | } | ||