summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cpio/cpio_v2.inc
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-21 16:17:40 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:43 +0100
commit2851d751a814bcf76f4032e8d3ff875a1012ba03 (patch)
tree741987cc27bda52ae9d95be47ade09b70cfc700c /meta/recipes-extended/cpio/cpio_v2.inc
parent8a4a7a261991d8cf49091472b99c68ac8ccab8f8 (diff)
downloadpoky-2851d751a814bcf76f4032e8d3ff875a1012ba03.tar.gz
cpio: use new update-alternatives
(From OE-Core rev: 6dee3050a4a0c4f3cc9fec23a0bc02155d680863) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cpio/cpio_v2.inc')
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc29
1 files changed, 10 insertions, 19 deletions
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
index 066e9374a2..3b3402b536 100644
--- a/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -17,26 +17,17 @@ S = "${WORKDIR}/cpio-${PV}"
17do_install () { 17do_install () {
18 autotools_do_install 18 autotools_do_install
19 install -d ${D}${base_bindir}/ 19 install -d ${D}${base_bindir}/
20 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}" 20 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
21 rmdir ${D}${bindir}/ 21 rmdir ${D}${bindir}/
22 case ${TARGET_OS} in
23 *-uclibc*) ;;
24 *) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;;
25 esac
26} 22}
27 23
28pkg_postinst_${PN} () { 24inherit update-alternatives
29 update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100
30 if [ -f ${libexecdir}/rmt.${PN} ]
31 then
32 update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50
33 fi
34}
35 25
36pkg_prerm_${PN} () { 26ALTERNATIVE_PRIORITY = "100"
37 update-alternatives --remove cpio cpio.${PN} 27
38 if [ -f ${libexecdir}/rmt.${PN} ] 28ALTERNATIVE_${PN} = "cpio rmt"
39 then 29
40 update-alternatives --remove rmt rmt.${PN} 30ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
41 fi 31
42} 32ALTERNATIVE_PRIORITY[rmt] = "50"
33ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt"