mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
469a4b9d8a
commit
a253b0e85e
@@ -10,7 +10,7 @@ RREPLACES_${PN} = "console-tools"
|
||||
RPROVIDES_${PN} = "console-tools"
|
||||
RCONFLICTS_${PN} = "console-tools"
|
||||
|
||||
PR = "r2"
|
||||
PR = "r3"
|
||||
|
||||
SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2"
|
||||
SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
|
||||
@@ -23,29 +23,9 @@ FILES_${PN}-consoletrans = "${datadir}/consoletrans"
|
||||
FILES_${PN}-keymaps = "${datadir}/keymaps"
|
||||
FILES_${PN}-unimaps = "${datadir}/unimaps"
|
||||
|
||||
ALTERNATIVE_NAMES_USRBIN = "chvt deallocvt fgconsole openvt"
|
||||
inherit update-alternatives
|
||||
|
||||
do_install_append() {
|
||||
usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}"
|
||||
for p in $usrbinprogs_a; do
|
||||
if [ -f "${D}${bindir}/$p" ]; then
|
||||
mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
pkg_postinst_${PN} () {
|
||||
usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}"
|
||||
for p in $usrbinprogs_a; do
|
||||
if [ -f "$D${bindir}/$p" ]; then
|
||||
update-alternatives --install ${bindir}/$p $p $p.${PN} 100
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postrm_${PN} () {
|
||||
usrbinprogs_a="${ALTERNATIVE_NAMES_USRBIN}"
|
||||
for p in $usrbinprogs_a; do
|
||||
update-alternatives --remove $p $p.${PN}
|
||||
done
|
||||
}
|
||||
bindir_progs = "chvt deallocvt fgconsole openvt"
|
||||
ALTERNATIVE_LINKS = "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}"
|
||||
|
||||
Reference in New Issue
Block a user