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 12:04:42 +0100 |
commit | 6d76d521a124b9b229b1a330cdaf977f434503be (patch) | |
tree | 743762fa051d5b5e566782548658d05f4bf0977d /meta/recipes-extended/tar/tar.inc | |
parent | 76c08cc0d2b36c343f4b37eec8a91f52533b3334 (diff) | |
download | poky-6d76d521a124b9b229b1a330cdaf977f434503be.tar.gz |
tar: use new update-alternatives
(From OE-Core rev: ed48d4b382dae08ac47bccdcb98b1e87dc6449cc)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 () { | |||
17 | 17 | ||
18 | do_install_extra () { | 18 | do_install_extra () { |
19 | install -d ${D}${base_bindir} | 19 | install -d ${D}${base_bindir} |
20 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} | 20 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar |
21 | rmdir ${D}${bindir}/ | 21 | rmdir ${D}${bindir}/ |
22 | rmdir ${D}${sbindir}/ | 22 | rmdir ${D}${sbindir}/ |
23 | mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} | ||
24 | } | 23 | } |
25 | 24 | ||
26 | pkg_postinst_${PN} () { | 25 | inherit update-alternatives |
27 | update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 | ||
28 | update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 | ||
29 | } | ||
30 | 26 | ||
31 | pkg_prerm_${PN} () { | 27 | ALTERNATIVE_PRIORITY = "100" |
32 | update-alternatives --remove tar tar.${PN} | 28 | |
33 | update-alternatives --remove rmt rmt.${PN} | 29 | ALTERNATIVE_${PN} = "tar rmt" |
34 | } | 30 | |
31 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" | ||
32 | ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt" | ||