diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-21 16:17:40 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 10:45:33 +0100 |
commit | 6dee3050a4a0c4f3cc9fec23a0bc02155d680863 (patch) | |
tree | 14b9c458e058bfe6c1caeaee0b79da7c88bc531f /meta/recipes-extended | |
parent | fc9c2fd512e592806b10d0273ca490c90072ff3f (diff) | |
download | openembedded-core-6dee3050a4a0c4f3cc9fec23a0bc02155d680863.tar.gz openembedded-core-6dee3050a4a0c4f3cc9fec23a0bc02155d680863.tar.bz2 openembedded-core-6dee3050a4a0c4f3cc9fec23a0bc02155d680863.zip |
cpio: use new update-alternatives
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/cpio/cpio_2.11.bb | 2 | ||||
-rw-r--r-- | meta/recipes-extended/cpio/cpio_2.8.bb | 2 | ||||
-rw-r--r-- | meta/recipes-extended/cpio/cpio_v2.inc | 29 |
3 files changed, 12 insertions, 21 deletions
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb index 78da20e3d4..73a3444b57 100644 --- a/meta/recipes-extended/cpio/cpio_2.11.bb +++ b/meta/recipes-extended/cpio/cpio_2.11.bb @@ -3,7 +3,7 @@ include cpio_v2.inc LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" -PR = "r1" +PR = "r2" SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb index 006e4f6dfb..cabc1cd605 100644 --- a/meta/recipes-extended/cpio/cpio_2.8.bb +++ b/meta/recipes-extended/cpio/cpio_2.8.bb @@ -3,7 +3,7 @@ require cpio_v2.inc LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" -PR = "r1" +PR = "r2" SRC_URI += "file://m4extensions.patch \ file://avoid_heap_overflow.patch \ 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}" do_install () { autotools_do_install install -d ${D}${base_bindir}/ - mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}" + mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" rmdir ${D}${bindir}/ - case ${TARGET_OS} in - *-uclibc*) ;; - *) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;; - esac } -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100 - if [ -f ${libexecdir}/rmt.${PN} ] - then - update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50 - fi -} +inherit update-alternatives -pkg_prerm_${PN} () { - update-alternatives --remove cpio cpio.${PN} - if [ -f ${libexecdir}/rmt.${PN} ] - then - update-alternatives --remove rmt rmt.${PN} - fi -} +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "cpio rmt" + +ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" + +ALTERNATIVE_PRIORITY[rmt] = "50" +ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt" |