diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-21 13:18:49 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 10:45:32 +0100 |
commit | ed48d4b382dae08ac47bccdcb98b1e87dc6449cc (patch) | |
tree | bfe298c1ef070a404970068f4aa53e7d0ce6dbeb /meta/recipes-extended/tar/tar.inc | |
parent | f0ad3c8ce298ca492938e4ded2263c54213786f6 (diff) | |
download | openembedded-core-ed48d4b382dae08ac47bccdcb98b1e87dc6449cc.tar.gz openembedded-core-ed48d4b382dae08ac47bccdcb98b1e87dc6449cc.tar.bz2 openembedded-core-ed48d4b382dae08ac47bccdcb98b1e87dc6449cc.zip |
tar: use new update-alternatives
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-extended/tar/tar.inc')
-rw-r--r-- | meta/recipes-extended/tar/tar.inc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc index 0533b82d27..8c475dfdea 100644 --- a/meta/recipes-extended/tar/tar.inc +++ b/meta/recipes-extended/tar/tar.inc @@ -17,18 +17,16 @@ do_install () { do_install_extra () { install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar rmdir ${D}${bindir}/ rmdir ${D}${sbindir}/ - mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} } -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 - update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 -} +inherit update-alternatives -pkg_prerm_${PN} () { - update-alternatives --remove tar tar.${PN} - update-alternatives --remove rmt rmt.${PN} -} +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "tar rmt" + +ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" +ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt" |